===========================
Below are the commanly used git commands
Navigate to the folder you want or execute the below command.
Steps:
1. md NewRepo
2. cd NewRepo
3. start . (It will open the window in explorer)
4. Right click and select "GIT GUI Bash Here"
git help
git config --global user.name "SriniVasanB"
git config --global user.email "sritechnoo@gmail.com"
git config -l
git config --global --unset user.password
git clean -df
git clean -df
git -n clean
git -dn clean
git clone ssh://git@github.com/<User_Name>/<Repo_Name>.git
git init <Repo_Name>
git status
## Check Status
git ls-files --stage
git ls-files --cached
git ls-files --modified
git ls-files --others
git ls-files --deleted
git ls-files --unmerged
git ls-files --killed
git add README.md
git add .
git add -A
git add --all
git rm -r --cached README.md = File only removed from the staging area
git rm -r --cached -f README.md = File removes in both places staging area and disk
git commit -m "<Commit_Message>"
git log
git log --summary
git log --oneline
git log directory/path/file
git log --author="name"
git log --graph --decorate --oneline
git branch
git branch -a
git branch <Branch_Name>
git branch -d <Branch_Name>
git checkout <Branch_Name>
git checkout -b <Branch_Name>
git merge <Branch_Name>
git merge <Source_Branch_Name> <Target_Branch_Name>
1. Create a Empty Repo in the remote Server
2. Copy the HTTPS Url from server.
3. git remote add origin https://github.com/<User_Name>/<Repository_Name>.git
4. git remote
5. git push -u origin <Branch_Name> (For Master: git push -u origin master)
6. It's prompt for Remote Server UserName and Password.then it commits.
git pull <remote> master E.g: git pull origin master
shift + :
wq