Git is an unbelievably useful tool for version control. It is used to keep a backup of your work that you can revert to if needed. Working with git you are able to make branches of your work. A branch is an independent line of development used when working on any new features, doing bug fixes, or just when doing things to the project that you don’t want to affect any working code.
I first used Git during my time at university like many I would guess, and I continue using it today – however, like everything there are always commands I forget, and while there’s already a lot of documentation out there on all the aspects of Git including branches, I don’t want to search for the commands across the internet each time I forget how to branch, so I have made a list of my most commonly used commands.
Name and move to new branch.
Git checkout -b New Branch name
Add new/modified files and commit.
Git commit -a -m “commit Message”
Git push origin branch name
Git checkout Branch name
Merge one branch in another branch.
Git checkout Branch Name Git merge Name of branch to merge with
That’s all for now hope this helps you out and if your memory is anything like mine I’m sure it will.