GIT merge and rebase workflow confirmation?
I have read a few others' questions regarding merge VS rebase, what to use and when, but I still have some questions for regular GIT users. Firstly, let me post what I understand to be good GIT practice:
- Create new branch B from existing branch A
- Add/commit changes on branch B
- Rebase updates from branch A
- Merge changes from branch B onto branch A"
From what I understand so far, the workflow above works best when using a heirarchical branching model (i.e. A = master branch, and B = experimental branch for working on a new feature). In short, it's good to rebase down the tree, and merge back up to the master. Am I correct in thinking this?
Now, if working with other developers who might be committing/merging changes to A (master branch), I would assume it's best for me to repeat steps 2 and 3 as often as I like to ensure that my work on branch B does not conflict with anything other users have been committing to branch A. If there are any conflicts, using rebase on branch 2 would reapply my commits and allow me to work out these conflicts BEFORE merging back up to branch A. Am I correct in my understanding?
Lastly, here's my main question: If I am not working with any other developers, and I am not touching branch A until I've finished my new feature in branch B, can I then skip the rebase (step 3), and just merge branch B into the master branch A? I guess it still doesn't hurt to do a rebase first, but unnecessary if I know that branch A hasn't been touched since creating branch B. Am I correct in my understanding?
PS. I'd like to thank you guys in advance for any guidance you can give me! I'm new to GIT, and never used a SCM system before using GIT.
Thank you, Jesse Leite http://www.aurorafxstudios.com/
I had a clean working git(-svn) repository with a lot of new commits. Let's label this the 'original' state. Then I made a git svn rebase which gave a lot of conflicts and the choices: When you have
I'm trying to rebase 'dev' to catch up to 'master' branch. $ git checkout dev $ git rebase master First, rewinding head to replay your work on top of it... Applying: Corrected compilation problems th
I've one question about general DVCS, including Git and Hg. In both Git and Hg merge tracking is done at the commit level instead of the file/directory level. One of the side effects is that you
Sorry, just another rebase question but I'm confused about that. Form time to time I push my commits on the develop branch to remote (origin). Now one thing always mentioned with rebase is: never r
We have a shared git repository that everybody uses and we have two branches master dev I have my own fork of this repo. I pull changes from the upstream repo from time to time into the respective
I'm just wondering what are more reasons to use git pull --rebase instead of git pull except this weird merge commits that appear when you do just git pull? Thanks!
I encountered a strange situation with git in which I had a feature branch that modified some files and deleted one file foo.js. When I rebased onto master via git rebase master feature, I encount
How i should use rebase for this case: I have 3 features in branches: feature/f1 feature/f2 feature/f3 and I have master branch: master I merge this 3 features into master branch. My commit history lo
How do I edit or reword a merge commit's message? git commit --amend works if it's the last commit made (HEAD), but what if it comes before HEAD? git rebase -i HEAD~5 doesn't list the merge commits.
I have the following situation: I made some commits to my local repository, and then a huge merge of another branch (~150 commits) into the master - it had a lot of conflicts in it. Now, I want to mov
I found some other questions that talk about a reverse merge in Git, but those questions are asking how to reverse merge an ENTIRE commmit. I want to reverse merge one directory in my tree. Is this po
When reordering commits with git rebase -i, is it possible to have a conflict?
In my project I need to use third party code, stored in several Git repositories. My project is also stored in (separate) Git repository. There are several people working with me on the main project,
Which is a recommended method when bringing aosp ics branch into master(my project main branch), git merge or git rebase? (By the way I read git rebase vs git merge, but still confused which is the pr
I have a problem with a SVN branch. I made a checkout of it with git checkout -t -b stable svn/stable. Then I did a merge with git rebase master. After that I tried to commit the merge changes into th
Just as the title illustrates. I recently tried to run a git rebase command that had the reverse effect from what the Git pro's section on rebasing had. Maybe I interpreted it wrong, but its driving m
This is basically what happens: > git rebase -i HEAD~3 Successfully rebased and updated refs/heads/master. Pops open my text editor then immediately completes the rebase before I even have the c
Is there anyway to undo a git svn rebase? I incorrectly did some merges and want to just go back to the way things were before I tried to rebase from the central repository.
We have been looking at the git workflow on the Atlassian website https://www.atlassian.com/git/workflows#!workflow-gitflow And based on that we have come up with our own spin on this workflow, which
I typically use git pull --rebase if I'm working directly on master (which I try not to do anyway). In the event that I forgot to do a rebase and just did git pull, is there a way to undo that and mak
Git merge/rebase show reason of conflict: CONFLICT (delete/modify): res/layout/dialog_item.xml deleted in dialog and modified in HEAD. Version HEAD of res/layout/dialog_item.xml left in tree. CONFLICT
I'm using git-svn and I accidentally typed git svn rebase on my feature branch, what are the ramifications? Normally I type git svn rebase on master, then I'll type git rebase master feature to updat
I'm using git rebase -p -i SHA1^ And moving a single commit backwards in time to just after SHA1. The commit consists of a WAV file, so there's no way this is breaking my code. Seemingly unrelated
Is there a way to ignore git-svn updates? my usual workflow: doing stuff in my dev git branch checking out my master git svn rebase on master cherry-pick from dev git svn dcommit checkout dev again
I have a question regarding continuous integration with Jenkins for Git/Gerrit: is there any way to cancel Jenkins job execution when the Git change needs a rebase/merge due to previous change has bee
I have been playing around with git (still very noob) and I wanted to know the difference between reset and rebase. Is the one more powerful than the other? Say I wanted to delete the 3 commits in
I am new to git and I want to start doing things 'properly'. I quite like this flow: git checkout -b featurebranch git commit -m some changes // manytimes * git pull // update master to origin's hea
My lead says to merge an issue into the main branch, first I should git fetch git checkout main-branch git reset --hard origin/main-branch # ??? git checkout my-branch git merge main-branch This appe
In this article, the author explains rebasing with this diagram: Rebase: If you have not yet published your branch, or have clearly communicated that others should not base their work on it, you hav
I have a question about git's work flow. I've found some guides, but maybe you guys can clarify this for me. Alright so the normal workflow that we are using in our department/project is: Master bra
i want to have no other branch history commit when i merge other branch to master. how can i do it ? as we know: git pull --rebase origin test # mean: only history commit no merge commit. git pull --n
at the moment when rebasing a branch ( e.g. a feature branch before merging into master ) I have to manually look up when the branch was created to tell git rebase the start-point for rebase. I have t
I have a (large) commit tree that contains several merge commits that I want to rebase to another commit. Doing a normal rebase causes git to ask me to resolve merge conflicts. I didn't want to review
I have a very strange problem: I have two separate branches and I am doing a simple git rebase --onto branchA tagOnMaster. This is done via a script that used to work perfectly on my old 32 bit machin
I'm having a serious problem trying to do git rebase --interactive on my repo. I get the cryptic error fatal: ref HEAD is not a symbolic ref, and my rebase ceases to function. I must git rebase --abor
I've often heard it said that using git rebase reduces the number of merge conflicts as opposed to git merge, but I've never found an explanation of why this is the case. Simply replaying one set of
While working on an open source project I encountered the following issue with git. I made a few changes, and sent a pull-request. The PR was accepted at first. However, my changes turned out to have
I have a branch that should be available to other contributors and that should constantly stay up to date with the master. Unfortunately, every time I do 'git rebase' and then try to push, it results
I'm using git svn to work with a client who has an svn repository (our stuff is in github). So I follow the instructions and do a git svn rebase and then git svn dcommit That worked the very first tim
We are checking out git and would like to understand which workflow might suit our small team (4 developers). Some details about what we do: We are working on a .NET product that is currently compose
I've got a git repo that imported a subdirectory of an svn repo a couple weeks ago. I tried to pull in changes from the svn repo and got the following: $ git svn fetch M data/tree.js Author: merger no
I tried to update git svn repo (git svn rebase) with cron job, but I get this error. usage: git-cat-file [-t|-s|-e|-p|<type>] <sha1> error closing pipe: Broken pipe at /usr/local/libexec/g
I've made a pull with rebase: git pull --rebase After two commits were successfully applied I started applying the third one. It the middle of this I realized that I did it wrong and it would be good
Is there a way to configure git so that git rebase --continue skips the no changes test? I don't want git rebase --continue to ever fail because it detects no changes. It should automatically delete
Can someone help me understand the difference between a branch, a fork and a clone in Git? Similarly, what does it mean when I do a git fetch as opposed to a git pull? Also, what does rebase mean in
My local master branch and origin/master branch diverted by just 1 commit, and I want to rebase my master on to origin/master, so I did this: git rebase origin/master This give me a conflict and I s
In a normal Git merge conflict, the three versions of a file in play for the three-way merge are roughly as follows: LOCAL: the version from my branch REMOTE: the version from the other branch BASE:
I have two branches: master tmp tmp branch is detached I need to put tmp branch on top of master with resolving conflicts in priority of tmp When I do git checkout tmp git rebase --strategy=recurs
How should my local Git workflow look? I'm using it to develop some software that will run on a local server. I'd also like to use this server as the git repo host. So far I've initialized a new repo
I know the thread which says that rebase is for small changes of teamMates, while merge for large changes. I keep three Gits of three teamMates in the following directory structure where we all have t