You are currently viewing 11 GIT Command Paling Populer

11 GIT Command Paling Populer

Working with Repository

1. Clone repo

git clone [repo]

2. Pull repo

git pull [master/branch name]

3. Add changes

git add [path]

4. Commit changes

git commit -m "description"

5. Push changes

git push origin [master/branch name]

6. Check repo url

git config --get remote.origin.url

Working with Branch

7. Check current branch location

git branch -a

8. Change branch location

git checkout [branch name]

9. Create branch and directly move to new branch

git checkout -b [branch name]

10. Delete branch

git branch -d [branch name]

11. Change branch name:

git branch -m [old name] [new name]

Leave a Reply