Files
2012-02-21 01:15:00 -05:00

1 line
6.9 KiB
JSON

[{"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1307998078.3581481, "message": "I'm using git-flow and trying to develop some patterns to make it easier to work with multiple branches", "group_id": 106, "id": 1384072}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1307998138.0062521, "message": "The simplest version of my question is this. I'm on feature/x branch. I want to pull down the lastest develop from origin and merge it into local develop. Then I want to merge the updated develop branch into my feature branch.", "group_id": 106, "id": 1384094}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1307998149.9518571, "message": "Right now that involves several onerous steps.", "group_id": 106, "id": 1384097}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1307998221.6211951, "message": "- stash local changes\n- checkout develop\n- git pull origin develop\n- checkout feature/x\n- git merge develop (or rebase, whatever)\n- git stash pop\n- resolve conflicts", "group_id": 106, "id": 1384121}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1307998264.670722, "message": "Is there a good shortcut for this that I'm missing? I know I could put it in a script, but I was hoping git or git-flow supported this in a clean way as I think it's pretty common.", "group_id": 106, "id": 1384134}, {"user_id": 9317, "stars": [], "topic_id": 39250, "date_created": 1308031729.8400669, "message": "you could always just pull into your current branch...", "group_id": 106, "id": 1387934}, {"user_id": 9317, "stars": [], "topic_id": 39250, "date_created": 1308031785.2174511, "message": "git stash && git pull origin develop\nresolve conflicts\ngit stash pop\nresolve conflicts\nuse git pull --rebase origin develop to rebase instead of merge", "group_id": 106, "id": 1387936}, {"user_id": 28370, "stars": [], "topic_id": 39250, "date_created": 1308034634.8224909, "message": "Try `git fetch` and `git merge origin/develop` instead of juggling branches and pulling.", "group_id": 106, "id": 1388371}, {"user_id": 28370, "stars": [], "topic_id": 39250, "date_created": 1308034684.4998701, "message": "or, instead of messing with stash, wait until you've committed all your local changes, then to the merge... or rebase if you've not pushed yet.", "group_id": 106, "id": 1388374}, {"user_id": 2142, "stars": [], "topic_id": 39250, "date_created": 1308037857.0382831, "message": "like tekkub, I fetch and rebase the branch to the remote branch. Instead of stashing, I make a temporary commit so all conflicts are handled in one go. Then I use `git commit --amend` or `git reset HEAD~` to continue working on the current task", "group_id": 106, "id": 1388674}, {"user_id": 1736, "stars": [], "topic_id": 39250, "date_created": 1308039244.123179, "message": "Only partially related, but you should check out the git-up gem/command. Makes a lot of this much easier (though you still need to rebase local-only branches yourself).", "group_id": 106, "id": 1388748}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308076041.262203, "message": "@tekkub How is git merge origin/develop different from git merge origin develop?", "group_id": 106, "id": 1392908}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308075961.6973031, "message": "Wow. lots of awesome feedback.", "group_id": 106, "id": 1392904}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308076063.570575, "message": "The main point with my flow is I want develop merged into my local develop *as well as* eventually ending up in my feature branch. I don't want to bypass that step.", "group_id": 106, "id": 1392913}, {"user_id": 2320, "stars": [], "topic_id": 39250, "date_created": 1308077653.4280951, "message": "@polotek \"origin/develop\" is a local reference. \"origin develop\" is a remote reference.", "group_id": 106, "id": 1393072}, {"user_id": 28370, "stars": [], "topic_id": 39250, "date_created": 1308087059.8247981, "message": "@polotek `git merge origin develop` will merge the LOCAL branches origin and develop. You'd want `git pull origin develop` to do what you're trying to do", "group_id": 106, "id": 1394431}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308625196.0932789, "message": "This is not a huge issue, but it's a minor annoyance. I always kind of thought tracking branches were smarter.", "group_id": 106, "id": 1444676}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308624708.0937109, "message": "@tekkub, yeah sorry I know the difference, just wrong version in the message. should have been git pull origin develop.", "group_id": 106, "id": 1444614}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308624775.9193151, "message": "So I'm caught up on how tracking branches work. And the suggestions here work. But there is one minor thing that seems to be missing", "group_id": 106, "id": 1444628}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308624993.3946879, "message": "I can do git fetch and that will update all of my local tracking branches. I can git merge origin/develop and that will merge the local version of origin/develop into my current branch. BUT it does not update my local named branch called \"staging\". UNLESS that is the branch I'm currently on. For example:", "group_id": 106, "id": 1444655}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308625150.3852179, "message": "- git checkout feature/mine\n- git fetch --all\n- git merge origin/develop (feature/mine is now up to date with origin/develop)\n- git checkout develop (my local develop branch)\n- git history (wtf, not updated with origin/develop)\n- git merge origin/develop \"or\" git pull origin develop ( things are where I wanted them to be )", "group_id": 106, "id": 1444671}, {"user_id": 2320, "stars": [], "topic_id": 39250, "date_created": 1308685809.3880661, "message": "@polotek When you say `git merge origin/develop`, that merges origin/develop with *the current branch*, even if you're on a different branch than develop, whose upstream isn't develop", "group_id": 106, "id": 1451452}, {"user_id": 2320, "stars": [], "topic_id": 39250, "date_created": 1308685763.6880629, "message": "@polotek tracking creates a relationship between the local branch and remote branch specified. This directs git pull without arguments to pull from that upstream branch.", "group_id": 106, "id": 1451449}, {"user_id": 2320, "stars": [], "topic_id": 39250, "date_created": 1308685875.7409971, "message": "So when you ran `git history` after you merged and then switched to develop, of course it's not updated, you never told git to update the local develop branch", "group_id": 106, "id": 1451468}, {"user_id": 2630, "stars": [], "topic_id": 39250, "date_created": 1308727553.125345, "message": "@catsby Yeah I realize that. What I really want is not practical I think", "group_id": 106, "id": 1455225}]