Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save m8ttyB/946961 to your computer and use it in GitHub Desktop.
Save m8ttyB/946961 to your computer and use it in GitHub Desktop.
Git Cheat sheet
Workflow:
From forked & updated repo:
create branch
Either:
-git branch litmus_11759_test_blank_search (create branch)
-git checkout litmus_11759_test_blank_search (switch to that branch)
or:
-git checkout -b litmus_11759_test_blank_search (create & switch to branch)
do work in branch
-if added files, add them to git
git add <filename>
-commit in branch
git add <changed files>
git commit -m 'message'
(do not use "git commit -a -m 'litmus 11759: added test for blank search' " as it will make AutomatedTester cry.)
push forked branch
- (if never pushed before)
git remote add myfork git@github.com:Marlena/Addon-Tests.git
- (every push)
git push origin litmus_11759_test_blank_search
Click "pull request" on original github repo
To move head back to master: git checkout master
Once work on branch is finished, clean up.
Sync back up with automatedtester's master:
git remote add automatedtester git://github.com/AutomatedTester/Addon-Tests.git
git fetch automatedtester
git merge automatedtester/master
To change filename:
git mv old_filename.py new_filename.py
(commit the file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment