首页 > 技术文章 > git基本操作若干

hawk-whu 2017-04-25 23:33 原文

开发合并分支,推送到远程

1
. git diff 查看修改内容; 2. git add -A 添加所有修改; 3. git commit -am "给人的提示"; 提交修改内容 4. git push origin 你的分支名字; 5. git checkout test;切换到其它分支; 6. git merge --no-ff pri_zk;把你的分支内容合并到当前分支上; 7. git status 查看一下状态,没有冲突就push; 8. git push origin test;

个人信息
1. git config --list 查看; 2. git config --global user.name "wdm" 修改提交用户的名称; 3. git config --global user.email "wdm@test.com" 修改提交用户的邮箱

修改远程地址
1. 查看:git remote -v 2. 修改:git remote set-url origin git@github.com:wdmyong/hello-world.git
3. 删除:git remote rm origin 4. 添加:git remote add origin 地址

 

推荐阅读