``` git --prune ``` cleans up remote and local branches ``` git branch -a ``` list all local and remote branches ``` git branch -r ``` list remote branches ``` git pull git merge master/origin ``` remember to merge remote changes aftera pull ``` git commit ``` - opens up vim so that you can add an extended message - if your want to reference an issue, type #[issue] is the commit message - once you push to github, press the exclamation mark to create a pull request and close the issue with the commit ``` git config --local credential.helper cache --timeout=5000 ``` stores github credentials in cache ``` git remote -v ``` list remotes ``` git remote add [name] [url] ``` add a remote ``` git remote set-url [name] [url] ``` ``` git fetch [remote] ``` updates all remote branches that we have access to ``` git log master..[remote]/branch --oneline --noe-merges ``` review remote logs ``` // add remote first git fetch githubschool git merge githubschool/merge git push origin master ``` updates your own fork with recent changes from master ``` git config --local alias.update '!git fetch origin && git fetch githubschool' git config --local alias.sync '!git pull origin && git push origin' git config --local alias.lg '!git log --oneline --graph --decorate --all' git config --lcoal alias.update-fork '!git checkout master && git update && git merge' ``` How to search for projects to help out with on Github: Use the advanced search page and search by label:beginner or label:help ... ``` git ls-remote ``` list pull requests ``` git reset --soft HEAD~3 ```