branch

svn : how to create a branch from certain revision of trunk

橙三吉。 提交于 2019-11-29 18:55:49
The following action will only create a branch from the head revision of the trunk. How do I create a branch from a specific revision? Thanks. $ svn copy http://svn.example.com/repos/calc/trunk \ http://svn.example.com/repos/calc/branches/my-calc-branch \ -m "Creating a private branch of /calc/trunk." Check out the help command: svn help copy -r [--revision] arg : ARG (some commands also take ARG1:ARG2 range) A revision argument can be one of: NUMBER revision number '{' DATE '}' revision at start of the date 'HEAD' latest in repository 'BASE' base rev of item's working copy 'COMMITTED' last

Consequences of using graft in Mercurial

邮差的信 提交于 2019-11-29 18:45:39
There've been several questions recently about skipping changes when maintaining release branches in Mercurial. For example: Mercurial: Branch specific changes keep coming back after dummy merge Why are Mercurial backouts in one branch affecting other branches? Since it was introduced in 2.0, I've wondered about using graft to avoid this problem. Given a revision tree like this: A---B---C---D---E---F---G---H---I---J Suppose we need to create a release branch that skips the Evil change E . hg update -r D hg graft "F::J" giving us: A---B---C---D---E---F---G---H---I---J \ --F'--G'--H'--I'--J' Q1:

How do I move a Git branch out into its own repository?

孤街浪徒 提交于 2019-11-29 18:35:28
I have a branch that I'd like to move into a separate Git repository, and ideally keep that branch's history in the process. So far I've been looking at git filter-branch , but I can't make out whether it can do what I want to do. How do I extract a Git branch out into its own repository? CB Bailey You can simply push a branch to a new repository. All of its history will go with it. You can then choose whether to delete the branch from the original repository. e.g. git push url://to/new/repository.git branch-to-move:new-branch-name For a new repository, new-branch-name is typically master.

What is the simplest way to do branching and merging using TortoiseSVN?

折月煮酒 提交于 2019-11-29 18:33:58
What is a really simple "how to" to do branching and merging using TortoiseSVN? JoelFan Assuming your work directory is working from the trunk: Right-click on the "root work folder" (this term always refers to Windows Explorer) and do svn update to update your work folder to the latest trunk. Make sure what you have is stable. Right-click on the root work folder and do svn commit to make sure any local changes are committed to the trunk. Right-click on the root work folder and do svn repo-browser . If you don't already have a branches folder in the repository: right-click on the folder just

How to correctly close a feature branch in Mercurial?

谁说我不能喝 提交于 2019-11-29 18:32:23
I've finished working on a feature branch feature-x . I want to merge results back to the default branch and close feature-x in order to get rid of it in the output of hg branches . I came up with the following scenario, but it has some issues: $ hg up default $ hg merge feature-x $ hg ci -m merge $ hg up feature-x $ hg ci -m 'Closed branch feature-x' --close-branch So the feature-x branch (changests 40 - 41 ) is closed, but there is one new head , the closing branch changeset 44 , that will be listed in hg heads every time: $ hg log ... o 44 Closed branch feature-x | | @ 43 merge |/| | o 42

When does git refresh the list of remote branches?

删除回忆录丶 提交于 2019-11-29 18:31:35
Using git branch --all shows all remote and local branches. When does git refresh this list? On pull/push? And how to refresh it using git bash ? Thank you all a lot! centralcmd To show all local and remote branches that (local) git knows about git branch -a To update the local list of remote branches: git remote update origin --prune I believe that if you run git branch --all from the bash that the list of remote and local branches you see will reflect what your local Git "knows" about at the time you run the command. Because your Git is always up to date with regard to the local branches in

How to merge remote master to local branch

与世无争的帅哥 提交于 2019-11-29 18:31:25
I have a local branch of a project ("configUpdate") that I've forked from somebody else's project and I've done a load of changes on it and would like to merge the changes they've made in to my local branch. I've tried git pull --rebase origin configUpdate but it hasn't grabbed the latest changes - how can I merge the two? (also for bonus points what did I do with the pull --rebase command?) How about (assuming you're currently on branch configUpdate): git fetch git rebase origin/master In a nutshell: git merge branchname takes new commits from the branch branchname , and adds them to the

Git 入门+工作基本够用详解

我是研究僧i 提交于 2019-11-29 18:13:07
常用 Git 命令清单 //如果你觉得排版不是很舒服请看 原址http://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html 作者: 阮一峰 日期: 2015年12月 9日 我每天使用 Git ,但是很多命令记不住。 一般来说,日常使用只要记住下图6个命令,就可以了。但是熟练使用,恐怕要记住60~100个命令。 下面是我整理的常用 Git 命令清单。几个专用名词的译名如下。 Workspace:工作区 Index / Stage:暂存区 Repository:仓库区(或本地仓库) Remote:远程仓库 一、新建代码库 # 在当前目录新建一个Git代码库 $ git init # 新建一个目录,将其初始化为Git代码库 $ git init [ project - name ] # 下载一个项目和它的整个代码历史 $ git clone [ url ] 二、配置 Git的设置文件为.gitconfig,它可以在用户主目录下(全局配置),也可以在项目目录下(项目配置)。 # 显示当前的Git配置 $ git config -- list # 编辑Git配置文件 $ git config - e [ -- global ] # 设置提交代码时的用户信息 $ git config [ -- global ] user . name

Why does Git not store the branch name as part of the commit?

久未见 提交于 2019-11-29 17:55:30
问题 Please note : I'm not trying to restart the argument whether Mercurial or Git is better, I just have a technical question that I, as a Mercurial user, don't understand. I'm also not sure whether SO is the right place to ask such a question, but it is programming related. There have been many discussions about how the two version control systems Git and Mercurial differ from each other from a user's point of view (e.g. What is the Difference Between Mercurial and Git? and http://felipec