An open API service indexing awesome lists of open source software.

https://github.com/jeremylikness/git-fork-branch-cheatsheet

My cheat sheet for the git/fork/branch workflow
https://github.com/jeremylikness/git-fork-branch-cheatsheet

branch-cheatsheet branching git git-workflow

Last synced: 4 months ago
JSON representation

My cheat sheet for the git/fork/branch workflow

Awesome Lists containing this project

README

        

# git-fork-branch-cheatsheet

My cheat sheet 📜 for the git/fork/branch workflow.

## âš™ Set up

1. Fork it
2. `git clone `
3. `git remote add upstream .git`

## 🔃 Workflow

1. `git pull upstream master`
2. `git push origin master`
3. `git checkout -b `
4. Work. Work. Work.
5. `git push origin `
6. Create PR
7. Wait for it to be merged, then ...
8. `git checkout master`
9. `git pull upstream master`
10. `git branch -d ` (or `-D` if necessary)
11. `git push origin master`
12. `git push --delete origin `
13. `git pull upstream master`
14. `git push origin master`

## 🆘 Get out of Jail, Free

(when things go wrong, force fork to sync with upstream)

âš  **WARNING** only do this if you do _not_ have pending commits. They will be obliterated!

1. `git fetch upstream`
2. `git reset --hard upstream/master`
3. `git push origin master --force`

_quod erat demonstrandum_