Useful Git Terminal Commands

Delete git local branch

https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/


Switch branch using git checkout

git checkout <existing_branch_name>

if the branch does not exist, -b option will create a new branch for the same.

git checkout -b <new_branch-name>


Git pull till a particular commit

git pull is nothing but git fetch followed by git merge. So what you can do is

git fetch remote example_branch

git merge <commit_hash>


https://stackoverflow.com/questions/31462683/git-pull-till-a-particular-commit/48728993


https://www.freecodecamp.org/news/git-checkout-remote-branch-tutorial/




Comments

Popular posts from this blog

python-docx | docx | No module named 'exceptions'

Fixing TortoiseSVN icons overlay in Windows 10

MySQL 8 User creation and grant privileges