GIT 使用指南
Git Proxy:设置代理
git config --global http.proxy 代理地址
Repository clone
git checkout branchName
工作流程:
1.为一个feature新建一个branch在它上面进行开发, 最好在远程repository上直接创建 -- 本地创建要选择基于哪个branch
2.add 这些改动到stage -- 在sourceTree里选中就直接添加文件到stage
3.暂存修改git stash
4.切换回主分支更新代码 git checkout develop, git pull
5.切回工作分支merge最新代码 git checkout aa, git merge develop
6.commit them to local branch — commit -m “message”
7.push this branch to remote repository — 远程创建的分支用git push 本地建的分支用git push origin TEST-142:fix/TEST-142
5.raise a merge request on gitlab to merge the new branch to develop
git 架构
git会有两个仓库,一个是remote repository,一个是local repository
git的三个区域:
remote repo --------------- local repo ----------------- local work area
git fetch 从remote repo 到 local repo
git pull : 从remote repo 拉到 local repo 和 local work area.
git branch -d xxx 删除本地分支
git branch -D xxx 强制删除本地分支
git branch -a 查看本地和远程所有分支
git branch 查看本地分支
git stash 保存unstaged 临时修改的文件
git stash apply 恢复stash的文件
git merge xxx 将xxx分支merge到当前分支
相关文章
- git升级
- GIT+Gitolite+Gerrit 环境搭建 ***
- git 合并分支技巧一则
- git中的SSL certificate problem: unable to get local issuer certificate错误的解决办法
- Git 系列(一):什么是 Git
- git submodule use
- git使用中的一些问题
- git获取网上的项目
- git internal for computer scientists
- git pull 与 git fetch
- GIT简介
- Git复习(二)之远程仓库、注册GitHub账号、SSH警告、使用GitHub
- jenkins git 之 Advanced clone behaviours
- 【错误记录】Git 使用报错 ( git branch -a 仍能查询到已经删除的远程分支 )
- git fatal: branch ‘master‘ does not exist
- oschina/git github使用指南
- git使用命令
- git cannot lock ref
- git学习小结(未完待续)
- git入门:Linux操作系统下 git环境搭建 | 生成公私密钥