git warehouse initialization
git init
#add all files
#$ git add --all
The local warehouse is connected to the remote warehouse
git remote add origin [remote url]
3. View the current status
git status
4. Add the code to the temporary storage area
git add .
5. Add the code to the warehouse
git commit -m 'project initialization'
6. Submit the local code to the remote warehouse
git push -u origin master
to force submission
git push -u -f origin master
How to restore git to the specified version
View the submitted version and id of git to get the version number that needs to be restored
Command: git log
2. Revert to the specified version
Command: git reset --hard 7d0188042cddc6ceb7b6bd249cd9a214e9cd7fa4 //The next big string is the version id
3. Force push
Command: git push -f origin master