Posts

Showing posts from May, 2019

Working with Git command line

Working with Git CLI   Core concepts: git config --global user.name=‘isharma’ git config --global user.email='xyz@abc.com’ git config   --list   git status [ Check the current status ]   Git remote add origin [Url to empty git branch on Remote] [This will basically create repo from local directory] Git steps: Working Area, Staging Area, History, Git Server git branch -r [ Check all the branches ] git branch -b ‘branch-name’ [create new local branch] Git add . [move changes to Staging Area from the working area] Git diff [Difference between changes in the working area to staging area] Git commit -m ‘msg’ [move changes from staging area to git history] Git diff   --staged [difference between changes in the staging area to git history] Git push origin master: master [move changes from history to git server] Git reset HEAD ‘added files’ [Revert the changes done to history   area] Git checkout   -- ‘committed files’ [Revert th...