标签:
http://rogerdudler.github.io/git-guide/
https://www.atlassian.com/git/tutorials/
--------------------
ssh-keygen -t rsa -C "***@***.com(邮箱)"
cd .ssh
subl id_rsa.pub 之后在页面添加key
或者
ssh-keygen -t rsa -C "***@***.com(邮箱)"
cat ~/.ssh/id_rsa
-----------------------------------------------
# set user name
git config --global user.name ‘***(name)‘
# set user email
git config --global user.email ‘***@***.com(邮箱)‘
# set file mode
git config --global core.filemode false
# set content editor
git config --global core.editor vim
# set diff tool
git config --global merge.tool vimdiff
# set ui color
git config --global color.ui auto
cd ..
cd Traning/ --- 自己建的文件夹
git clone git@git.***.com.cn:projectName/***.git(项目路径,git项目里会提供)
git clone -b develop git@git.***.com.cn:projectName/***.git
------------------------------------------------
还原为前一次的状态:git reset --hard origin/master
ls
cd 文件夹/
git status
git stash
git pull origin develop
git stash pop
gitg
git commit -m ""
git push origin deveop
-------------------
只有自己一个分支时使用
git add -A
git commit -m "comment..."
git pull -r
git push origin ***(name)
-----------------------------------------
# create branch
git branch ***(name)
git config --global user.name ***(name)
------------------------------------------
#将develop刚提交的代码插到master分支上
在develop分支上找到刚提交代commitId(b0f1878ee0f3d08669c2bb9094eaf6a534b2dd3d)
在develop分支上git stash,然后git status检查一下,
git checkout master
git branch查分支,确认在maste分支上
git pull -r再git pull -r确认一下
git cherry-pick b0f1878ee0f3d08669c2bb9094eaf6a534b2dd3d 将你在develop分支修改的插到master分支
gitg 查是否提交上(跟master其他代码在一线上)
git push origin master
git branch
git checkout develop
git status
git stash pop
git branch
标签:
原文地址:http://www.cnblogs.com/floraCnblogs/p/git.html