All Git Commands for version control system.
Download Git Software : (https://git-scm.com/downloads)
Command | Function | |
---|---|---|
1. | git --version |
To check the version your git software. β³ |
2. | git init |
To initialize empty git file repository.π‘ |
3. | git clone <URL> |
To clone a github repository on your local system. |
4. | git status |
To check the status of your repository.π |
5. | git add |
To add your files π |
6. | git commit -m <commitaddress> |
To address your commits. β€ |
7. | git log |
To check the details about your file entries π |
8. | git log --oneline |
It will gives the exact oneline view of your recent file commits. |
9. | git checkout <file ID> <file name> |
To go back to your previous version of your particular commit. |
10. | git checkout -- <filename> |
To come back to your current version. |
11. | git reset <file name> |
To go to your normal stage level. |
12. | git push origin master |
To push your commits to your master branch github repository. |
13. | git pull origin master |
To pull commits from your master branch github repository. |
14. | git commit -a -m <commitaddress> |
To address all of your commits. |
15. | git rm --cached <filename> |
To unstage a staged file to be commited. |
16. | git add . |
To add all of the untracked files detected by git. |
17. | git remote |
Lists all remote github repositories associated with your local git project. |
18. | git remote -v |
Lists in verbose all remote github repositories associated with the local project. |
19. | git remote add origin <URL> |
To link your local git repository with your remote github repository. |
20. | git config --global user.name "Your Name" |
To configure your github account username with git. |
21. | git config --global user.email your@example.com |
To configure your github account email with git. |
22. | git config --list |
To list all your git configurations. |