git 基本操作
2019-07-16 09:04
48 查看
原文链接:http://www.cnblogs.com/qq917937712/p/11192814.html
** git对应分支确立跟踪关系 **
目录.git文件夹下有个config文件
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true [remote "origin"] url = git@gitlab.ec2.nmi.hk:nextplus-minisites/nextplus-archive.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [branch "release"] remote = origin merge = refs/heads/release
[remote "origin"] 代表git远程目录
[branch "master"] 代表跟踪关系
注意:新建一个分支(branch_001)后,可能回事这种跟踪关系。此时最好将refs/heads/master改成 refs/heads/branch_001,这样在push或者pull的时候,就直接git push 或者git pull就行了
[branch "branch_001"] remote = origin merge = refs/heads/master
[branch "branch_001"] remote = origin merge = refs/heads/branch_001
转载于:https://www.cnblogs.com/qq917937712/p/11192814.html