Git分支开发合并代码主干上线
当前开发流程:分支开发,主干上线
举例:
先fork项目主干代码到个人仓库中
1) 当前项目仓库为(upstream):git@chegva.com:devops/example.git,主干分支为:upstream/master(为待上线分支)
2) 当前个人仓库为(anzhihe):git@:chegva.com:anzhihe/example.git,主干分支为:origin/master ...
Continue reading >>当前开发流程:分支开发,主干上线
举例:
先fork项目主干代码到个人仓库中
1) 当前项目仓库为(upstream):git@chegva.com:devops/example.git,主干分支为:upstream/master(为待上线分支)
2) 当前个人仓库为(anzhihe):git@:chegva.com:anzhihe/example.git,主干分支为:origin/master ...
Continue reading >>旧仓库有些乱七八糟的提交纪录,有些可能还有敏感信息,如果我们需要清除所有这些历史纪录,成为一个全新的库,但是代码保持不变,方法如下:
Checkout
git checkout --orphan latest_branch
Add all the files
git add -A
Commit the changes
Continue reading >>git commit ...
A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected;
.gitignore看名字就知道是干什么的,忽略一些不想提交到仓库的文件。使用方法很简单,在Git工...
Continue reading >>Continue reading >># 添加远程仓库(可添加多个)
git remote add github git@github.com/anzhihe/youprojectname.git
git remote add coding git@coding.net/anzhihe/youprojectname.git
# 向不同仓库推送
git push github master
git push cod...
◎移至Gitee更新:https://gitee.com/anzhihe/Free-Git-Books
This is my personal collection of free git gitlab github books, feel free to share and read.
List of BooksYou can find all the books lis...
Continue reading >>