Hi there! Recently, I've spent some time to organize my git commands notes. I know you can find those commands online easily, but I would like to share these what I think useful and put them together here for my own references. Let's take a look! General Settings You will notice that, for each commit, it has both author name and committer name. Branches Operations Command Get current working branch git branch Checkout specific branch git clone -b specific_branch --single-branch http://username@192.168.99.100:8080/scm/your-repo.git Create a branch git checkout -b new_branch Push to remote branch git push origin remote_branch Delete local branch git branch -d <branch> Delete remote branch git push origin :[name_of_your_new_branch] Fast-forward merge Git Clone Clone into current directory Git Checkout Check out files deleted locally Sometimes, you might accidently delete some files in your local repos. Then you can use below command to pull them back from remote: Clone a subdirectory only of a Git repository What you are trying to do is called a sparse checkout. This creates an empty repository with your remote, and fetches all objects but doesn't check them out. Then do: Now you need to define which files/folders you want to actually check out. This is done by listing them in .git/info/sparse-checkout, eg: Last but not least, update your empty repo with the state from the remote: You will now have files "checked out" for "temp" folder on your file system, and no other paths present. Clone specific branch of a Git repository Just use singel-branch option: Git Remote I was wondering what is a git remote, here is:…