git clone https://.....git
git clone -b <branchname> https://.....git
git status -s
git add README.md | git add lib/* log/* | git add .
git rm README.rdoc
git status -s commit -m "updated readme"
git pull origin master
git push origin master | git push https://.....git master
git branch -a /** To see the available branches **/
git pull origin <branch-name> /** to pull from specific branch **/
git checkout <local-branch-name> /** to switch to another branch **/
git checkout -b <local-branch-name> origin/<remote-branch-name> /** to create a local branch **/
git checkout config/locales/*.yml /** revert changes **/
git clone -b <branch-name> https://github..... /** clone from specific branch **/
git fetch --all /** Unhide the hidden branch **/
/** to revert **/
git checkout app/scss/precompiles/application/_base.scss
git checkout config/routes.rb
git checkout config/routes.txt
git status -s
git reset --hard
git branch
git branch -D testing
git branch -a
git checkout -b testing
git pull origin testing
git fetch origin
git reset --hard origin/<branch name>
git differ <filename>
git mergetool -t gvimdiff
git diff <yourfile.txt>
/** after git add **/
git diff --cached <yourfile.txt>
Find your remote URL (remote.origin.url) with
git config -l thanks to Sergio Morstabilini
Your remote URL will be like this : https://{USERNAME}@github.com/{USERNAME}/{REPONAME}.git
Execute this command :
git config remote.origin.url https://{USERNAME}:{PASSWORD}@github.com/{USERNAME}/{REPONAME}.git