Git basic use Work with local repo create repo 主要步骤 git add git commit git status git branch git merge Work with remote repo git remote git pull git push git rm
# make directory a git repository git init
git fetch --0 #版本更新 git pull origin master #下载 git push origin master #推上
git add . # add all files git add <file_or_directory_name>
git commit -m "commit_message"
git status # returns the current state of the repository
git branch <branch_name> # create a new branch git branch -a # list all branches git branch -d <branch_name> # delete a branch
git merge <branch_name>
git remote <cmd> <remote_name> <remote_url> git remote -v
git pull <branch_name> <remote_URL/remote_name> git pull origin https://github.com/....git
git push <remote_URL/remote_name> <branch> git push origin main
git rm <file_name> # delete a file
git
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up