branch

Git - Automatically fast forward all tracking branches on pull

独自空忆成欢 提交于 2019-11-29 01:37:33
问题 I've set up tracking branches with the --track option, and when I do a git pull on master , it fetches all branches to origin/branchname but doesn't merge with the local tracking branches. This is extra annoying, because if I later do a git push on master , it says that non-fast-forward updates were rejected on the tracking branches, since they weren't fast-forwarded on the initial git pull . My question is: How do I make it so that git pull with fetch all branches and automatically fast

Discard a local branch in Mercurial before it is pushed

扶醉桌前 提交于 2019-11-29 01:13:52
Many times it happens that I have few commits on my local Hg repository which I don't want to push and sometimes I want to remove the local branch altogether. But I cannot rollback more than one commit which leaves me no choice than creating a new clone and download the whole repository again. This feels stupid, since if I could just delete my local branch which has not affected the remote repository in anyway, then I wouldn't have to create and setup a new clone. So, is it how it is in Mercurial or is there some way to discard a local branch? Thanks! If you enable the mq extension (bundled

Team Foundation Server switch between branches

核能气质少年 提交于 2019-11-29 01:09:49
Can we switch between branches in TFS what i want is i downloaded a working copy and now I want to switch to different branch without downloading everything, because for large projects it will take lot of time since developers spend lot of time downloading Is it possible, if not any workaround ?? You can switch branches from the command-line client (only downloading the differences) by changing your workspace mappings and using the /remap flag to the get command: tf workfold /map $/Branch1 C:\Work tf get C:\Work /version:T /recursive tf workfold /unmap $/Branch1 tf workfold /map $/Branch2 C:

Git merge testing branch (final commit) to master branch

那年仲夏 提交于 2019-11-29 00:29:54
I have created a testing branch. It has a lot of tiny commits to build one feature. At the end of it, I want to take the final completed changes, and put them into the master branch. The master branch, shouldn't contain the history of the testing branch. Testing branch will be removed eventually. What is the best way to achieve this? Would generating a patch and applying it on master be the best way? If so, how do I generate/apply the patch? Various approaches are described in " Understanding the Git Workflow ": Short lived work The vast majority of the time, my cleanup is just a squash merge.

git同步远程分支

泪湿孤枕 提交于 2019-11-29 00:18:36
git branch -r #查看远程所有分支 git branch #查看本地所有分支 git branch -a #查看本地及远程的所有分支,如下图 git fetch #将某个远程主机的更新,全部取回本地: git branch -a #查看远程分支 git branch #查看本地分支: git checkout 分支 #切换分支: git push origin -d 分支名 #删除远程分支: git branch -d 分支名 #删除本地分支 git remote show origin #查看远程分支和本地分支的对应关系 git remote prune origin #删除远程已经删除过的分支 情景1:同步别人新增到远程的分支 1.git branch查看一下本地分支,再git branch -a查看一下远程分支,对比下,远程存在哪些本地没有的新分支. 2.将某个远程主机的更新,全部取回本地:git fetch 3.再次查看远程分支:git branch -a 发现远程的分支已经可以看见了 4.拉取远程分支到本地:git checkout -b 远程分支名 创建远程分支并切换到该分支, git pull origin (远程分支名称) 情景2:本地删除了分支,远程也想删除 2.1:本地想要删除某个分支,远程仓库的这个分支也要删掉怎么办? a.使用git branch

In git, how can I find the revision at which a branch was created?

只愿长相守 提交于 2019-11-28 21:23:45
UPDATE: example repository, https://github.com/so-gitdemo/so-gitdemorepo In the context of the github repo. How can I easily locate rev "b0430cee"? I know I can just look, but the real example that this repository mimics has a dozen committers and multiple other branches. Not quite as easy to use inspection. How can I find the branch creation revision when the branch has been merged multiple times? I am aware of this question: How to determine when a Git branch was created? The solution does not appear to work for a branch that has been merged multiple times. We typically merge bug fixes back

GitHub: What is a “wip” branch?

烂漫一生 提交于 2019-11-28 20:42:30
问题 When I was browsing GitHub repositories I quite often saw "wip" branches (e.g. 3.1.0-wip ). What does "wip" mean? I couldn't find the answer anywhere - neither on Google nor on GitHub:help. 回答1: On GitHub, pull requests are prefixed by [WIP] to indicate that the pull requestor has not yet finished his work on the code (thus, w ork i n p rogress), but looks for have some initial feedback (early-pull strategy), and wants to use the continuous integration infrastructure of the project. For

Rename branch on github website?

爷,独闯天下 提交于 2019-11-28 19:42:29
问题 I don't know how to run command line stuff, well I just don't have environment. So I'm trying to rename a branch on the github website. It was default named to "patch-1". Is it possible to rename this on the site? 回答1: I think you can, just create a new branch with the new name, and delete the old one on github. More detail you can see here. 回答2: I just did it without downloading any code to my laptop only using github site. The solution looks the same as @swcool, but I want to add about

What is this branch tracking (if anything) in git?

霸气de小男生 提交于 2019-11-28 19:27:22
After creating a branch with --track (or leaving the default, or --notrack), you later wish to be reminded of what a branch is tracking. Is there a way, other than searching through the .git/config file, to display what a branch is tracking? Use: git branch -vv to see which branches are tracked and which are not. If you want to know for a given branch, you could do: git config --get branch.<branch>.remote If it prints a remote, it's tracking something. If it prints nothing and returns failure, it's not. Note that with git1.8.3 (April 22d, 2013) , you have a new way to emphasize the upstream

How to Determine the Work Items Fixed in a particular TFS Build when using Branches?

社会主义新天地 提交于 2019-11-28 19:25:24
We have begun using the following branching structure in TFS 2010: All changes so far have been performed in the Development branch, and all check-ins have been associated with a Task work item. The Tasks are all children either of a Bug or a Product Backlog Item work item. Each CI build is triggered for a particular changeset, and the changeset is associated with a Task, so we can manually figure out which Bug or PBI was just built. Some time after the code has been built, deployed to our Integration environment and tested by the developer, it is merged to the Main branch. Obviously, more