Skip to main content

Branch ↔ alt version for file/code

aka Branches

Branch Naming convention

Master

main Branch

References

  1. branch ↔ to create new Branch

  2. checkout ↔ to move onto Branch

  3. Merge ↔ to combine multiple Branch

  4. Conflict ↔ when 2 Commits to Merge overwrite same file, git unsure which Branch to keep

  5. Master ↔ main Branch

  6. git remote show ↔ to print details for remote Git Repo incl Branch

  7. merge ↔ to Merge Branches

  8. git branch ↔ to print list of Branches in project

  9. -d ↔ flag to safely delete Branch only if not already Merged into Master

  10. -D ↔ flag to force delete Branch ignore if Merged into Master

  11. git branch -D _name ↔ to force delete Branch of _name

  12. git branch -d _name ↔ to safely delete Branch of _name

  13. checkout -b _name ↔ to create new Branch of _name & check into it from Master

  14. checkout - ↔ to checkout prev Branch

  15. git rebase master ↔ to combine Branch into Master by modifying Master

  16. git log --graph --oneline --decorate ↔ to print Commit History as colorized ASCII graph (only applies to Repo with Branches )

  17. HEAD.git file to store ref to current Master Branch

  18. git rebase master --interactive ↔ to control rebase Master Branch via interactive doc editor to pick & squash Commits

  19. git push -u origin master ↔ to push local Git Repo Branch at Master to remote Repo