Git Commands
1. Set your global identity (applies to all repos on your machine):
git config --global user.name "Abhi Patel"
git config --global user.email "abhi@example.com"
git config --list
(This sets your name and email for commit history.)
2. git clone [link] :- server to locally copy
Ex. git clone https://github.com/AbhiPatel85/example.git
3. git add [file_name] :- add new file
Ex. git add abhi.txt
4. git commit -m "[write any msg]" :- saved made changed
Ex. git commit -m "Create new file"
git commit -m "[write any msg]" abhi.txt :- particular file commit
5. git push :- add update in server
6. git checkout [branch_name] :- go to another branch
Ex. git checkout code
7. git status :- to check the status
8. git pull :- to see the changed made in server on locally