git 配置 当前用户:~/.gitconfig 通过git config --global进行配置
git config --global user.name "userName"
git config --global user.email "userName@gmail.com"
git config --global color.ui "auto"
git config --global color.diff "auto"
git config --global color.status "auto"
git config --global color.branch "auto"
git config --global core.editor "nano"
git config --global --list进行查看当前用户的配置
git pull --rebase origin develop
git push origin develop
git commit -am "Resolved merge conflicts."
git commit -am "Bug 10507: fixed UI issue in selfservice where modal did not close correctly"
git merge --no-ff
git clone
git checkout --track origin/branchName
git remote prune origin :To refresh local branch list then I need to prune my branches list.
git reset --soft HEAD^ :Undo a commit
git push -u origin localBranchName
git config --global core.excludesfile ~/.gitignore_global
git init - initializing a repository in an existing directory
git clone [url] / git clone [url] targetdirectoryname - cloning an existing repository
git status - checking the status
git add [filename]/[directoryname] - tracking new files / staging files / if you modify a file after you run git add, you have to run git add again to stage the latest version of the file
git diff - to see what you’ve changed but not yet staged
git diff —staged - to see what you’ve staged that will to into your next commit
git commit -m “commit message” - to commit the staged files
git commit -a -m “commit message” - automatically stage files and commit
git rm “filename” - remove files
git rm —cached “filename” - keep the file in working tree but remove it from your staging area
git mv file_from file_to - rename a file
git commit —amend
git reset HEAD <file>
git remote add [shortname] [url] - to add a new remote git repository as a shortname
git fetch [remote-name] - to get data from your remote projects
git push [remote-name] [branch-name] - to push your work back up to the server
git tag - to list the available tags in git
git tag -l ‘v1.4.*’ - to search for tags with a particular pattern
git tag -a v1.4 -m ‘my version 1.4’ - to create an annotated tag
git show v1.4 - to see the tag data
git branch [branch-name] - to create a new branch
git branch -d [branch-name] - to delete a branch
git checkout [branch-name] - to switch to another branch
git checkout -b [branch-name] - to create and switch to a new branch
git fetch [remote reference] - to update your remote references
git push (remote) (branch) - to push your local branch to a remote
git checkout -b (branchname) origin/(remotebranchname) - to give you a local branch that you can work on that starts where origin/(remotebranchname) is
git push [remotename] :[remotebranch] - to delete remote branch
分享到:
相关推荐
Git是目前世界上最先进的分布式版本控制系统。以上为git命令总结。
git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git常用命令总结git...
git命令 总结
2024最新Git命令总结HM
最常用的Git命令总结
Git常用操作命令: 因为Git是分布式版本控制系统,所以需要填写用户名和邮箱作为一个标识。
git常用命令总结,包括配置用户、分支操作、更新提交合并、tag、stash、log等命令操作集合
本文档归纳了几类常用的git命令,包括对比、撤销、查看历史、远程分支操作、rebase、merge、cherry-pick,用比较简洁的面板总结这些git命令,在需要的时候可以快速查找,共享出来,希望对他人有帮助。
主要包括了git使用的基本命令。只是基本的命令,附带上简单的解释
git命令总结,代码修改,迁移,拷贝,抓取代码等管理..
常用git命令总结,常用git命令总结。 常用git命令总结。
git常用命令总结
git常用命令总结 git命令思维导图
git常用命令总结
git是linux系统管理源码常用工具,本资源归纳总结git常用命令使用。
是一些常见git命令的总结,对工作很有帮助。希望对大家有帮助
git常用命令总结
git常用命令总结 内容概要 本文总结了一些常用的Git命令,包括初始化和克隆仓库、添加和提交文件、分支管理、远程仓库操作、查看和比较改动等。通过学习本文,您将了解以下内容: Git的基本原理和概念; 常用的Git...
git 所有汇总命令总结