Pull the remote to the local cartridge
git clone ××
cd ×××
View branch
git branch -a
Switch to the desired branch operation
git checkout branch wants to operate
In the local repository delete files
I git rm files
Delete a folder in the local repository
I git rm -r folder /
where -r represent all subdirectories recursively, if you want to delete, empty folder, where you can not bring -r.
Submit code
git commit -m "My Edits"
Pushed to the remote repository (such as GitHub)
Branch git push origin wants to operate
Question: git fetch does not work
Edit the .git/config
file, fetch
into the second form below, do not write dead master.
[remote "origin"]
url = https://github.com/xxx/project.git
fetch = +refs/heads/master:refs/remotes/origin/master
改:
[remote "origin"]
url = https://github.com/xxx/project.git
fetch = +refs/heads/*:refs/remotes/origin/*