Git Commands – Daily Used

******************** For solving ssl errors *********************************
git config –global http.sslVerify false
****************************************************************************

git remote add origin https://gitlab.xxxxx.com/xxxxxxxxxx/XMLJsonConverter.git
git remote -v
git checkout -b IndiaAutomation
git clone https://gitlab.xxxxx.com/xxxxxxxxxx/XMLJsonConverter.git -b master
git clone https://gitlab.xxxxx.com/xxxxxxxxxx/XMLJsonConverter.git -b master
git branch
git checkout master
git status
git push origin IndiaAutomation
git commit -m “Made changes in Dummy files”
git add .
git checkout -b IndiaAutomation
git fetch origin master
git merge
git pull origin master (It auotmatically merge with current branch)
git checkout .
git checkout <full file name>
git reset (to undo git add .)
git log (to see git history)
git reset –hard HEAD~1 (to undo commited changes where file will be deleted prermanantely)
git reset –hard HEAD~2 (to undo commited changes where file will be deleted prermanantely)
git reset –soft HEAD~1 (to undo commited changes where file will be preserved)
git reset –soft HEAD~2 (to undo commited changes where file will be preserved)
git reset Head “filepath” (to bring tracked file to untracked)
https://stackoverflow.com/questions/927358/how-to-undo-the-most-recent-commits-in-git/40445749

git stash
git stash apply
git stach list
https://git-scm.com/book/en/v1/Git-Tools-Stashing