1. Delete git rm **.html "If the files in the workspace are not deleted, the files in the staging area will not be deleted, you must first remove the workspace"
git rm--cached **.html "This is a no-delete workspace to delete only staging area"
git rm-f **.html "This will remove both staging area and workspaces at the same time."
2, restore, if accidentally deleted the work area files, to restore the first use git log to find his corresponding ID and then run
git checkout ID name file name "restore version Specify a single file"
git reset--hard ID name "restore version is not for specified file"
git reset--hard head^ "restore the previous version can also specify the first few versions of restore such as restore the first two git reset--hard head~2"
Git reflog "found the version ID that was restored because it was not found by using git log, and then restored with git reset--hard ID name"
3. Sync to remote Repository
Open the local GitHub tool to view the configuration options to see if he's connected to a git account.
Use git remote command to see the remote repository naming default is Orgin
You can also use Git remote-v to view the address of a remote repository
Then the push command is: Git push origin (remote repository name) Master (Remote Repository Branch)
And then refresh on GitHub to see the uploaded files.
4. If you want to give your peers access to your GitHub permissions, use the following actions
Then you create a group project
Last designated person access
5, another person to download the uploaded version of the file code with the git clone and URL so that it can be downloaded from the server down
6. Conflict problems in development "developer uploaded code is out of sync" pull the conflicting files down with git fetch
Then use git diff master Origin/master to compare the conflicting content.
Merge conflicts again git merge origin/master trade-offs
Then commit git commit-a-M "YUJSSDSD"
Finally, with git pull, he's just going to skip the above and just cover your local code with the cloud code.
Git && GitHub (ii)