branch

Git branch has diverged after rebase, so why rebase?

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Recently I came across the notification that my branch has diverged. That was when I made a feature branch, pushed it to remote, and did a rebase with master a few days later when I started working on it again. git checkout -b feature-branch git push origin feature-branch:feature-branch ...and when in master... git pull origin master git checkout feature-branch git rebase master But when I want to push my branch again, it says: On branch feature-branch Your branch and 'origin/feature-branch' have diverged, and have 67 and 1 different commit

git checkout --ours does not remove files from unmerged files list

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hi I need to merge two branches like this. This is just an example what is happening, I work with hundreds of files which need resolution. git merge branch1 ...conflicts... git status .... # Unmerged paths: # (use "git add/rm <file>..." as appropriate to mark resolution) # # both added: file1 # both added: file2 # both added: file3 # both added: file4 git checkout --ours file1 git chechout --theirs file2 git checkout --ours file3 git chechout --theirs file4 git commit -a -m "this should work" U file1 fatal: 'commit' is not possible because

Perforce, How to integrate a change to another branch?

匿名 (未验证) 提交于 2019-12-03 02:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have trunk and a release branch. If I fixed a bug in release branch, I definitely should integrate the fix back to trunk. However, I didn't find a command dedicated to integrate such a single change list; did I miss something? 回答1: To integrate changelist 100, for example, you'd use: p4 merge //releasebranch/...@=100 //trunk/... p4 resolve p4 submit (If you have an older Perforce server you'll have to use 'integ' instead of 'merge'.) Note that '@=100' means the same thing as '@100,100' in this context. 文章来源: Perforce, How to integrate a

Visual Studio 2013 Github commit deadlock

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: A few friends and I are working on a project via github. We are all sharing the same branch, which may or may not be a good idea. I edited some of the code and committed the changes. I went to pusj commit to github (I am working with Vis. Studio 2013 and it's built-in Git tool), but I got this error: "There are new remote changes. You must pull them before you can push." So I tried to pull the remote changes and I get this error: "An error occurred. Detailed message: An error was raised by libgit2. Category = 21 (MergeConflict). 9

“Cannot update paths and switch to branch at the same time”

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I sometimes use the checkout -b option to create a new branch, check it out at the same time and set up tracking in one command. In a new environment, I get this error: $ git checkout -b test --track origin/master fatal: Cannot update paths and switch to branch 'test' at the same time. Did you intend to checkout 'origin/master' which can not be resolved as commit? Why does Git not like it? This used to work with the same repo. 回答1: ' origin/master ' which can not be resolved as commit Strange: you need to check your remotes: git remote -v

What is the master branch and release branch for?

匿名 (未验证) 提交于 2019-12-03 02:47:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My English is not good enough to understand the explanation of git flow For my understanding. Master branch is for ready-product which can be downloaded on the market by users. But there is an release branches I have no ideas theses branches is release for whom ? Release for customers ? or for QA? http://www.flickr.com/photos/appleboy/5488984404/ 回答1: Once develop has acquired enough features for a release (or a predetermined release date is approaching), you fork a release branch off of develop. Creating this branch starts the next release

Cloning a repository without making it the origin remote

匿名 (未验证) 提交于 2019-12-03 02:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm cloning a git repository from a computer that's going to be wiped. Is it possible to clone a repository without making the original repository origin/master ? Or do I need to clone it, and then delete the remote branch (which is done with git remote rm origin )? Edit : The repository has only one branch, and no tags. 回答1: It is not necessary to make the original repository the "origin" remote to clone the master branch. On the new machine, create a new repository: git init foo Then pull the old repository into the new one, without

git push: refs/heads/my/subbranch exists, cannot create

匿名 (未验证) 提交于 2019-12-03 02:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is this not possible to create somme sub-sub-folder in a repo on a server? if i do: git push origin dev/master everything work find but if i do git push origin dev/sub/master i got this: error: 'refs/heads/dev/sub' exists; cannot create 'refs/heads/dev/sub/master' i checked with "git branch -r" and directly with ssh, there isn't dev/sub folder already created. what's wrong? 回答1: It's not a folder that exists, it's a branch . (Well, there may be a folder/directory involved somewhere―or maybe not, as references get "packed" and stop existing

Is using “feature branches” compatible with refactoring?

匿名 (未验证) 提交于 2019-12-03 02:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: “ feature branches ” is when each feature is developed in its own branch and only merged into the main line when it has been tested and is ready to ship. This allows the product owner to choose the features that go into a given shipment and to “park” feature that are part written if more important work comes in (e.g. a customer phones up the MD to complain). “ refactoring ” is transforming the code to improve its design so as to reduce to cost of change. Without doing this continually you tend to get uglier code bases which is more difficult

Git Workflow Best practices

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Stupid question and treat me as completely a newbie to version control. I'm new to Git (I've used subversion before, but just the basics) I understand the basics of Git and its branching commands, I have an imaginary situation that need your advice. Suppose my software currently is at v1.2, stable and released. My Software v1.0 v1.1 v1.1.1 v1.2 <- Current, Compilable and Released Scenario: I have two developers, John and Eric. John is responsible for bug fixes reported by clients. Eric is responsible for new features, experiment with them