branch

Clearing special permissions from folders in a branch

血红的双手。 提交于 2019-11-28 10:24:54
We're a fairly large project with a single trunk branch. Most of it uses the default permissions, but a few folders have custom permissions - say, only "Builders" group is allowed to check-in. We want to allow people to create their own private branches out of trunk, where they can freely check-in and merge later (hopefully often). However, creating a branch, the special permissions are copied along with the folders, meaning that people can't freely check-in into their branch. Is there a way to clear special permissions from a branch, or a folder? Is there a way to do so automatically, so

Block a git branch from being pushed

断了今生、忘了曾经 提交于 2019-11-28 09:37:24
Here's the situation: I have a public repository for my open-source app on github.com. However, now I'd like to write some specific code that will not be public (I might use it in a commercial version of my application). I figured I could use the same repository, and I'd create a "private" branch in my git repository that I wouldn't push. But, mistakes happen. Is there some way to forbid git from ever pushing a branch to remote servers? If there's a better way to handle this situation, I would of course welcome any suggestions. A slightly hackish solution: Make a dummy branch on GitHub with

Migrating SVN (to Git) branches with white space in the names

孤人 提交于 2019-11-28 09:05:47
问题 I'm facing a common problem migrating SVN to Git, basically I have some branches (on SVN) named with white spaces. Is there a way to solve or workaround it? I've found some "solutions" but none of them worked for me. For tags with white spaces: https://stackoverflow.com/a/11365319/575643 User svn2git do not worked also git gc just compress the data (basically) I have a rude and massive repository to migrate and the command already migrated more then 90% of them (it took more then a week).

[git] git 分支( branch ) 的基本使用

人走茶凉 提交于 2019-11-28 07:39:08
分支( branches ) 是指在开发主线中分离出来,做进一步开发而不影响到原来主线。 Git 存储的不是一系列的更改集( changeset ),而是一系列快照。当你执行一次 commit 时, Git 存储一个 commit 对象,它包含一个指针指向你当前需要提交的内容的快照。 Git 中的 master 分支的功能,和其他分支一样。master 在 git 项目中常见到,是因为 git init 命令运行时默认创建一个分支,并命名为 master。 创建一个新的分支,就是创建一个新的指针,用来在快照间移动。Git 通过 HEAD 指针,指向当前工作的本地分支。 $ git branch testing 使用 git checkcout 命令,可以切换分支。 $ git checkout testing 修改文件并 commit 代码后,会移动分支的指针 $ vim test.rb $ git commit -a -m 'update test.rb' 通过 checkout 可以切换回去 master 分支。下面的命令做了两件事,一是把 HEAD 指针指向了 master 分支,二是当前工作目录的文件恢复到了 master 所指向的快照版本。也就是说 87ab2 提交的变动,在切换到 master 分支时被移除。 $ git checkout master 再做一些变更和

Reasons for not working on the master branch in Git

£可爱£侵袭症+ 提交于 2019-11-28 07:12:23
So, I'm fairly new to git and I've after a bit of reading around over the last couple of weeks I've read a few people saying that the master branch shouldn't be changed but rather branched from and then merged to. I'm happy enough to work with branches but was wondering for the reasons behind not working on the master branch? i guess the usual reasoning is, that the master branch should represent the 'stable' history of your code. use branches to experiment with new features, implement them, and when they have matured enough you can merge them back to master. that way code in master will

SVN分支与主干合并

亡梦爱人 提交于 2019-11-28 07:07:12
1、主干合并到分支 1在本地trunk中先update一下,有冲突的解决冲突,保证trunk和repository已经完全同步, 2.在/branches /MyProject上右键,依次选择”TortoiseSVN” -> “Merge…”, 3.在弹出的窗口中选择第一项”Merge a range of revision”,这个类型的Merge适用于将某个分支或主线上提交的多个revision间的变化合并到另外一个分支上。 4.点击next 这里的”URL to merge from”应该填trunk的路径,理解为 “从主干合并“ 到分支,”Revision range to merge”就是要将trunk的哪些revision所对应的变化合并到branch中 5.点击next: 在这里只需保留默认设置即可。 在点击Merge按钮前你可以先Test merge一下,进行测试。 点击Merge按钮后trunk所做的修改将同步到branch中。 至此,branch 已经完全和 trunk 同步,合并发生在本地 working copy,只要你不提交就不会影响到 repository。 所以我们和合并操作后,处理好冲突(如果存在冲突)后,将代码提交到 repository。 2、分支合并到主干 和 “分支合并到主干”基本 一样,需要注意第2步和第4步 2.在/trunk

Vendor Branching, Mercurial Style?

谁都会走 提交于 2019-11-28 06:56:58
The scene: A purchased web application, with regular updates from the vendor. We then, heavily customize the look and sometimes add our own functionality or fix a bug before the vendor gets to it. For version control, we have been using Subversion following their “Vendor Branch” model each time we received a new release. This has the added benefit that we have a, version controlled, vanilla copy of their system. The problem: We would like to switch to Mercurial and will likely follow the stable/default branching pattern. Mercurial makes perfect sense if we were to only receive a single release

How to merge to get rid of head with Mercurial command line, like I can do with TortoiseHg?

好久不见. 提交于 2019-11-28 05:45:41
My question is this: If I have two heads (branches with changes) in my Mercurial repository, and I'd like to get rid of one of them, but discard all the changes from that branch instead of merging them into the other, and I can't strip out those changesets so I have to merge, how can I do that with the command line client? If I have two heads in my Mercurial repository, and use TortoiseHg as my client, the repository might look like this: Then I can get rid of the test2 head by doing a merge and discarding. First I would update to the head I'd like to keep ( test3 in this case, which in the

git rename branch

爷,独闯天下 提交于 2019-11-28 05:39:48
git push origin HEAD:newbranch git push origin newbranch git branch -a #查看所有分支 git branch -r #查看远程分支 git branch -vv #查看本地分支所关联的远程分支 git branch -m old_branch new_branch # Rename branch locally git push origin :old_branch # Delete the old branch or git push --delete old_branch git push --set-upstream origin new_branch 或者git push -u origin new_branch# Push the new branch, set local branch to track the new remote 来源: https://www.cnblogs.com/tonggc1668/p/11394636.html

How to REALLY delete a git branch (i.e. remove all of its objects/commits)?

妖精的绣舞 提交于 2019-11-28 05:23:39
I have a git tree like A---B---C topic / D---E---F---G master <-- I would like to remove topic and all objects on it. I note the SHA ID of topic, then type: git branch -D topic git gc # <-- I also tried prune here... git checkout -b temp <SHA1 ID of topic> After the last command I expect to get an error (something like "Non-existent object ID..." or somth. like that). However there is no error and gitk shows the same tree structure as above?? What am I missing - I thought gc/prune are supposed to delete all unreachable objects? Duke Just the gc prune is often not enough to get rid of the extra