Git 命令的相关使用整理
git branch 本地所有的分支列表(List all existing branches)
git branch -a 远程所有的分支列表(List all existing branches)
git checkout dev 检出分支或者切换分支
git pull 在当前分支进行拉取远程内容
git commit -m 提交内容
git push 推送到远程
git status 查看工作区内的文件修改(List changed files in your working directory)
git add . 添加本地库中的所有修改在下次提交的时(Add all current changed to the next commit)
git commit -m 提交工作区所有文件(Commit all local changes in tracked files)
git stash 查看临时的文件变动 (Store changes temporarily)
git checkout 切换分支(Switch HEAD branch)
git branch 创建新分支(Creat a new branch based on your current HEAD)
git branch --track 创建一个新的分支基于一个远程的分支(Creat a new tracking branch based on a remote branch)
git branch -d 删除一个本地分支(Delete a local branch)
git branch origin --delete 删除一个远程分支(Delete a remote branch)
git push : 重命名远程分支名(Rename a branch on remote)git push
git push
git remote prune origin 更新远程删除的
git remote update origin --prune 更新远程添加的
当使用git提交代码时出现GIT error: The following untracked working tree files would be overwritten…的错误时候,可通过下面指令解决问题。git clean -d -fx
git clean -d -fx