branch

Need to restore a deleted branch in Subversion

蹲街弑〆低调 提交于 2019-11-27 00:12:22
问题 I have two working copies of a Subversion repository, one of the trunk, and one of a branch I created. I accidentally deleted the branch in a repository browser. How do I restore the branch? Is there a way to undo the most recent commit for the whole repository? 回答1: Use: svn cp [path to deleted branch]@[revision before delete] [new path] For example: svn cp svn://myrepo.com/svn/branches/2.0.5@1993 \ svn://myrepo.com/svn/branches/2.0.5_restored Where 1993 is the revision before the delete...

Git: Merge to master while automatically choosing to overwrite master files with branch

时间秒杀一切 提交于 2019-11-27 00:03:02
I am using Git to track my documentation latex source. I want to keep the master branch full of documents that are suitable for end user release, so when someone needs something, i can just switch to the master branch, compile and hand out the document. I make new branches when a manual needs a major update. But, when the manual is approved, it needs to get merged back into the master. When merging from branch into master , I would like to pass some command to Git to say, "forget the merging, just use the the file from branch to overwrite the file in master ." Is there a way to do this?

Git 仓库 Push到Git@OSC常见错误

人走茶凉 提交于 2019-11-26 23:56:18
将在本地创建的Git仓库push到Git@OSC出现的错误 常见错误: 1.error:failed to push some refs to ... 问题(Non-fast-forward)的出现原因在于:git仓库中已经有一部分代码,所以它不允许你直接把你的代码覆盖上去。于是你有2个选择方式: 1.强推,即利用强覆盖方式用你本地的代码替代git仓库内的内容 git push -f 2. 先把git的东西fetch到你本地然后merge后再push $ git fetch $ git merge 这2句命令等价于 $ git pull 可是,这时候又出现了如下的问题: 上面出现的 [branch "master"]是需要明确(.git/config)如下的内容 [branch "master"] remote = origin merge = refs/heads/master 这等于告诉git2件事: 1,当你处于master branch, 默认的remote就是origin。 2,当你在master branch上使用git pull时,没有指定remote和branch,那么git就会采用默认的remote(也就是origin)来merge在master branch上所有的改变 如果不想或者不会编辑config文件的话,可以在bush上输入如下命令行: $ git

How do I make git-svn use a particular svn branch as the remote repository?

一曲冷凌霜 提交于 2019-11-26 23:54:22
问题 A word of warning: I'm a n00b to git in general. My team uses feature branches in svn , and I'd like to use git-svn to track my work on a particular feature branch. I've been (roughly) following Andy Delcambre's post to set up my local git repo, but those instructions seem to have led git to pick the svn branch that had changed most recently as the remote repository; the problem is that's not the branch I care about. How do I control which branch git-svn uses? Or am I approaching this

How do I create a new branch?

北战南征 提交于 2019-11-26 23:49:26
问题 How do I create a new branch with my working copy using TortoiseSVN? I see the branch option, but I don't see a way to name it somehow. 回答1: Branches in SVN are essentially directories; you don't name the branch so much as choose the name of the directory to branch into. The common way of 'naming' a branch is to place it under a directory called branches in your repository. In the "To URL:" portion of TortoiseSVN's Branch dialog, you would therefore enter something like: (svn/http)://path-to

Managing release branches in Mercurial

随声附和 提交于 2019-11-26 23:47:32
Recently I switched from SVN to Mercurial. Now I wonder how to realize my intended branching work flow in Mercurial according to good practice, hoping other developers understand what happens in the repository. This is the work flow: Usually I have a trunk/default branch where work on the current release series happens. Let's say that is 1.x. At the same time I use a branch 2.x to work on the next major release. Changes in this branch may be radical, so merging with the trunk/default/1.x branch makes no sense here. After a while work on 2.x may be finished and version 2.0 gets released. Now I

Mercurial: Can I rename a branch?

♀尐吖头ヾ 提交于 2019-11-26 23:47:10
问题 We now have a "stiging" branch, where "staging" seems to be a far better semantic fit. What's a good strategy for handling this? 回答1: Update to the stiging branch and create a new branch off of it. Then close the old branch. In summary: hg update stiging hg branch staging hg commit -m"Changing stiging branch to staging." hg update stiging hg commit --close-branch -m"This was a typo; use staging instead." hg push --new-branch 回答2: For future readers: With the rebase extension, you can make a

Using TortoiseSVN how do I merge changes from the trunk to a branch and vice versa?

醉酒当歌 提交于 2019-11-26 23:46:28
问题 I've been reading up on branching/merging with Subversion 1.5 using the excellent and free Version Control with Subversion book. I think that I understand how to use the Subversion command line client to perform the actions that I need most often, which are: Update Branch with Changes from Trunk From the branch's working directory run: svn merge http://svn.myurl.com/proj/trunk Merge Branch into Trunk From the trunk's working directory run: svn merge --reintegrate http://svn.myurl.com/proj

git pull from master into the development branch

隐身守侯 提交于 2019-11-26 23:44:23
问题 I have a branch called dmgr2 (development) and I want to pull from the master branch (live site) and incorporate all the changes into my development branch. is there a better way to do this? here is what I had planned on doing, after committing changes: git checkout dmgr2 git pull origin master this should pull the live changes into my development branch, or do I have this wrong? 回答1: The steps you listed will work, but there's a longer way that gives you more options: git checkout dmgr2 #

Can git permanently ignore a remote branch?

扶醉桌前 提交于 2019-11-26 23:34:09
问题 I'm using the Pages feature of GitHub. This works by putting the published HTML in a branch called gh-pages . I have two separate working directories, one for the project itself and one for the HTML docs. In the former, I want to completely ignore the gh-pages branch, as it's an unrelated line of work and I don't want it to clutter up my various commit visualizations. That is, what I have is: $ git remote show origin * remote origin Fetch URL: git@github.com:reidpr/quac.git Push URL: git