Computer Guy
asked on
Git Merge Question
Hi, See questions in Bold.
From my master branch I "git checkout -b ABC"
do my changes, then add and commit the changes "git commit -am 'Made a fix'"
checkout my stage which is an active on Github "git checkout stage"
then merge with ABC "git merge ABC" I am also prompted to list a commit message here, is there a way to make it carry over from ABC?
then push "git push origin stage"
Also, is there a simpler process to achieve all of this, or is this about it?
From my master branch I "git checkout -b ABC"
do my changes, then add and commit the changes "git commit -am 'Made a fix'"
checkout my stage which is an active on Github "git checkout stage"
then merge with ABC "git merge ABC" I am also prompted to list a commit message here, is there a way to make it carry over from ABC?
then push "git push origin stage"
Also, is there a simpler process to achieve all of this, or is this about it?
try rebasing onto the stage branch
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you could always add some aliases to your .bash_aliases file, for example:
alias gca='git commit -am'
then in your shell all you have to do is:
gca "my commit message"
alias gca='git commit -am'
then in your shell all you have to do is:
gca "my commit message"
Rebasing is really bad practice unless everyone on your team knows what they are doing really well
Would be interested to know what problems it has presented you. I've been using rebase for many years without issue.
When you rebase you rewrite history. This can cause pain if you're trying to go back and find something you committed before history was rewritten. I personally prefer to see all the ugly history and have the ability to go back and cherrypick very specific commits if I need to - it happens. Some people prefer a clean looking repo.
I am not really arguing for one or the other. I am merely warning that when you rebase strange things can seem to happen, and unless you're really up to speed with how it all works, it can be a real PIA to figure out wtf happened.
I am not really arguing for one or the other. I am merely warning that when you rebase strange things can seem to happen, and unless you're really up to speed with how it all works, it can be a real PIA to figure out wtf happened.
Where is the problem in writing one-line commit mesage "I am trying to merge ABC" ?
@gheist, I don't think anyone claimed this to a problem. In fact, that is what I'm suggesting. cheers.