Git Commands
发布时间:2020-12-14 16:36:26 所属栏目:百科 来源:网络整理
导读:Git Version $ git --version Git Config 1. set user name,email $ git config --global user.name MudOnTire $ git config --global user.email 895157882@qq.com 2. get config $ git config user.name $ git config user.email Repository 1. git init $
Git Version
Git Config1. set user name,email
2. get config
Repository1. git init
2. git status
3. stage filesingle file
all changed files
4. unstage file
5. commitmake commit
show history
show condensed commit
Undo Commits1. checkout commit
2. reattach to branch
3. revert commit (undo one particular commit)
4. reset commitssoft (retain changes)
hard (erase all changes)
create branch1. show branches
2. create a branch
3. switch to a branch
4. delete a branch
5. create and then switch to a branch
merge branch1. merge target branch to current branch
2. push local branch to remote (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |