git config –list
- View git configuration information, including user name and mailbox
git init
- Initialize the current folder as a Git repository. The current folder is master.
git status
- View the current status of the folder,
git add .
- Add all files in the current folder to the local repository
git commit
- Commit only files in the staging area, that is, only files that appear green under Status.
- When we submit, the file whose status originally showed green is not displayed.
git log –oneline
- View all committed short logs
Git Checkout specifies the hash file name for the git checkout submission
git reset HEAD filename
- Undo files from the cache to the workspace
Git checkout – filename
Undo the workspace modification of the filename file to the last git add or git commit.
Git remote add origin <repository URL>
Git remote set-url origin <remote-url>
git remote set-url origin <remote-url>
Copy the code
View the warehouse path
git remote -v
Copy the code
Push to remote repository
git push -u origin master
Copy the code