Posts

Showing posts with the label Git

Save Username and Password of Git Credentials in Storage

Linux To prevent the git password prompt in each git pull request can be prevented by storing the password in the local disk. To keep the credentials on disk. git config credential.helper store To enable credentials storage globally, run: git config --global credential.helper store When credentials storage is enabled, the first time you pull or push from the remote Git repository, you will be asked for a username and password, and they will be saved in ~/.git-credentials file.

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/