You are on page 1of 1

Set up new repo on local computer

(use Terminal or Windows command line)


Navigate to directory of files to commit

git init
git status
(to check status git add . (adds all files in directory)
of repo)
git commit -m "Initial commit"

Git/GitHub
Command Line Process In web-based GitHub acct, create new
repository (+ in upper right of screen), label
Save local snapshot to GitHub same name as local Git repo.

Follow instructions for "push existing repo from


command line"
git pull origin master Pull code from GitHub
1) git remote add origin https://github.com/ ...
(might be just 'git pull')
2) git push -u origin master (may need to enter
username and password)

Make commits to an git add filename.py


EXISTING repo add file(s)
git commit -m "Create filename.py"
commit file(s)
git commit -am '<commit_message>' (-a
adds all changes to files already being
tracked which saves having to add them
explicitly with git add ...) If have new files
that have never been committed, need
to set up tracking so use git add .

git push (to push committed local files to the remote


repo)

You might also like