Back to articles
Git Overview
How-ToTools

Git Overview

via Dev.toKALPESH MOHANTA

Git Commands Guide Git Commands Logout - Remove your user settings # Unset global configurations git config --global --unset user.name git config --global --unset user.email git config --global --unset credential.helper # Clear cached credentials (if using cache helper) git credential-cache exit Remove file or directory from staging area (without deleting from local filesystem) git rm --cached <file or dir to be remove from staging> Setting up global config for 1st time (Used for reference of user) git config --global user.email "you@example.com" git config --global user.name "Your Name" Initialise Repository git init Determine current branch git branch Switch Between Branches git checkout main Rename Branch # Rename branch name from master to main git branch -m master main Create a New Branch git checkout -b blog-post-title Delete the Feature Branch git branch -D feature # Delete this branch from remote git push origin --delete feature Add Your Content git add <file-name> Status of cu

Continue reading on Dev.to

Opens in a new tab

Read Full Article
3 views

Related Articles