Last active
July 29, 2018 09:55
-
-
Save sumanssaurabh/5ec88d2f3fc4c77d2223be5ac036c3d6 to your computer and use it in GitHub Desktop.
Git basic cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Basic commands | |
git init //Initalize Local Git Repository | |
git add <file> //Add Files to index | |
git status //check status of working tree | |
git commit //commit changes in index | |
#remote commands | |
git push //push to remote Repository | |
git pull //pull latest from remote Repository | |
git clone //clone Repository into new directory | |
git add . //index all files in directory | |
git rm --cached <file> // to unstage file working tree | |
git commit -a -m '' // it will add any new file and commit | |
git remote add origin https://github.com/sumanssaurabh/chrome.git | |
git remote add origin [email protected]:username/repo-init.git | |
git push -u origin master | |
#Change your remote's URL from SSH to HTTPS with the git remote set-url command | |
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment