branch

Git merge from a specific folder only

为君一笑 提交于 2019-11-30 10:31:21
I've created a rails website for client X. I now have a client, Y, who wants a website that does the exact same thing as client X, but with a different skin. I made a git branch from clientXcode and called it clientYcode. I then did all the changes to the views to make it look different, and lala, the same website with a different skin. Now here's what I don't understand about git: I've made many changes to clientXcode in the views, models, and controllers; and now I want to merge those changes into clientYcode, excluding any view changes. Since views, models, and controllers each have their

How do I list and fetch remote branches after SVN to Git migration? [duplicate]

那年仲夏 提交于 2019-11-30 10:15:18
This question already has an answer here: How do I migrate an SVN repository with history to a new Git repository? 32 answers I migrated our SVN repository to Git and pushed it to a central repository. We had a fair amount of tags and branches, but somehow we were not able to list and fetch those from a Git client. This was weird, because the tags and branches seemed to be available on the server. With help from a Jon Maddox blog post , a blog post from Marc Liyanage and a SO answer from Casey I was able to stitch a solution together. Thanks for all the help! Here's what I ended up doing.

When does Git refresh the list of remote branches?

我是研究僧i 提交于 2019-11-30 10:04:35
问题 Using git branch --all shows all remote and local branches. When does Git refresh this list? On pull/push? And how do I refresh it using Git Bash? 回答1: To update the local list of remote branches: git remote update origin --prune To show all local and remote branches that (local) Git knows about git branch -a 回答2: I believe that if you run git branch --all from 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

How to merge remote master to local branch

强颜欢笑 提交于 2019-11-30 10:03:17
问题 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?) 回答1: How about (assuming you're currently on branch configUpdate): git fetch git rebase origin/master

Sorting out a Git mess

倖福魔咒の 提交于 2019-11-30 09:22:14
I've just inherited a project which was maintained using Git. At one point, the code was deployed onto 3 separate systems and each system maintained their own decentralised Git respository. Each of the 3 systems extended the original base system in 3 different directions. None of the 3 systems have been synchronised against each other. Some changes are on master branch, others are on new branches. How can I bring the 3 different sources together so that I can: find a common base to work with; find out which changes are bug fixes which should be applied across all 3 systems; and maintain the 3

Merging changes from master into all branches using Git?

假如想象 提交于 2019-11-30 08:46:53
I use git to maintain multiple working copies of my code. The idea is that I can check out any branch, build and run it to see how the branch's feature x fits in with the current state of the code. Git's master branch is the Trunk and the other git branches are features or things I would like to try out. Therefore, my typical usage is updating the master with the latest fixes and then merging master into the individual branches so each of them stays up to date. This system works well for me, except for the fact that I have to checkout a branch, merge the master and rinse/repeat for the other

Is it possible with Git to retrieve a list of tags that exist only in a certain branch?

让人想犯罪 __ 提交于 2019-11-30 08:41:49
问题 I would like to know if it's possible in Git to retrieve a list of tags (much like the result of the git tag command), but the list should be limited only to a certain branch. If this is possible, can anyone explain how this is done? Perhaps with some pattern-matching magic? 回答1: Another approach would be possible with the new git tag options --merged (in git 2.7+, Q4 2015) git tag --merged <abranchname> See commit 5242860, ... (10 Sept 2015) by Karthik Nayak (KarthikNayak). (Merged by Junio

“if” versus “switch” [duplicate]

匆匆过客 提交于 2019-11-30 08:33:37
Possible Duplicate: is “else if” faster than “switch() case” ? I've encountered a lot of situations lately where I have very simple conditionals and need to branch application flow. The "simplest" means of accomplishing what I'm doing is just a plain old if / elseif statement: if($value == "foo") { // ... } elseif($value == "bar") { // ... } elseif($value == "asdf" || $value == "qwerty") { // ... } ...but I'm also considering something like: switch($value) { case "foo": // ... break; case "bar": // ... break; case "qwer": case "asdf": // ... } This seems a little less readable, but perhaps it

Git merge and push

故事扮演 提交于 2019-11-30 08:28:27
I am starting with Git, so I feel that this question could be the newbiest question of day because this task is so simple, but it's causing a terrible headache.. I have 2 local branches: master local/production And 2 remotes: master production I need to pass local changes to production. So, my workflow was: git checkout local/production git merge master git commit git push git merge: Seems Work fine, it detected all differences. git commit: On branch local/production Your branch is ahead of 'origin/production' by 2 commits. nothing to commit (working directory clean) And git push: Everything

How do closed branches affect Mercurial performance?

巧了我就是萌 提交于 2019-11-30 08:13:46
I've noticed that some answers to questions about branch names quote the Mercurial wiki to indicate that the branch-per-feature or branch-per-bug naming conventions may cause performance problems. Does the ability to mark branches as closed with the --close-branch flag on commits have any affect on this performance claim? Martin Geisler Does the ability to mark branches as closed with the --close-branch flag on commits have any affect on this performance claim? Marking a branch closed with hg commit --close-branch merely creates a new changeset with a close=1 marker in the changeset meta data.