Most useful git commands

Most useful git commands are git init, git add ., git commit, git push, git pull, git feth

1. git init// to start local repo

2. git add .//to add local changesto staging area

3. git commit -m “change1″// to collect stagedchanges

4. git push// to push localcommittedchanges toremote branch

5. git fetch// will fetchremote branchchanges to yourlocal repo (notto workspcae)

6. git pull// it is git fetch + mergeto your workspace

7. git remote show origin// to find remote git url

8. git checkout baranch// checkout to local branchall commits will be recorded

9. git checkout -b branch// create new local branchand check out