Jed Rembold
April 29, 2026

So far we have great ways to manage our local histories, but still not great ways to collaborate
Git has a concept of remotes, which are basically just copies of a repository kept on a (most of the time) remote server
Git works locally 99% of the time, so there are special commands to use when you want to “sync” contents between your local repository and the remote repository
Before either can be done, we need to inform Git of where the remote for a given repository exists
git remote add {name} {url}
{name} is by convention
origin unless you are connecting multiple
remotes{url} is the address where that remote
can be reachedOften, you might be given a remote address initially, and need to copy that repository over to your local system
Git calls this cloning a repository
git clone {remote url} {directory name}
{remote url} is the url of where the
remote lives{directory name} is the local directory
you want to copy that remote repository into
This automatically sets up a remote for the new local git repository
In order for the remote to be useful, we need to let it know what we have done locally
Git calls this pushing changes to the remote
git push {remote name} {local branch}:{remote branch}Typing all that in can get old, so we can specify it once by saying
git branch --set-upstream-to={remote name}/{remote branch}
at which point in the future we could just do
git pushOn multi-computer setups, it is possible that another system uploaded content to the remote that you do not yet have locally
Git calls this fetching from the remote
git fetch
fetchGets the remote information, but does not merge it with your local content
To do both at the same time (which is what you usually want), you can do
git pullPyAutoGUI library gives you methods
to simulate moving and clicking the mouse and pressing keys on the
keyboard
PyAutoGUI has a failsafe if you slam the
mouse (cursor) into one of the window corners| Command | Description |
|---|---|
.click() |
Clicks the mouse at the current location |
.moveTo(|||x,y|||) |
Moves to the coordinate (x,y) |
.move(|||dx, dy|||) |
Moves from current position dx
horizontally and dy vertically |
.drag(|||dx, dy|||) |
Clicks the mouse down and moves dx over
and dy down |
.pixel(|||x,y|||) |
Gets the RGB tuple of the pixel at that location |
.write(|||text|||) |
Presses the keys represented in the string text |
.position() |
Gets the current mouse position |
.displayMousePosition() |
Constantly prints the mouse position |
import pyautogui as pag
CHANGE = 50
pag.countdown(10)
pag.click() # Click to make the window active.
distance = 500
while distance > 0:
pag.drag(distance, 0, duration=0.5) # Move right.
distance -= CHANGE
pag.drag(0, distance, duration=0.5) # Move down.
pag.drag(-distance, 0, duration=0.5) # Move left.
distance -= CHANGE
pag.drag(0, -distance, duration=0.5) # Move up.
install.py to get PyAutoGUI
installed on your systemcookie_clicker.py.
click_the(loc), to
move the mouse to a given location and clickmain, which should
loop over and click the cookie
You all have been awesome this semester! It has been a joy to have you all in class and I hope to see you around in the future! (And maybe in another class!)