Bruce Gust
asked on
Is this the right sequence of Git commands for this scenario?
So, here's what's going on. How do you utilize Git in this scenario in a way where I'm being smart in preserving my work, while at the same time moving forward.
I push "final-activity-stream" up to Github
I do a pull request
the base branch has been updated
my team lead has made some edits to my code
he recommends a rebase
So, here's what I'm thinking as far as what I'm going to do "Git-wise." Tell me if this is on point...
'code-cleanup" is the base branch. I'm going to check that out locally and do a "pull" so everything is up to date
checkout "final-activity-stream," and create another branch off of it, just so I've got a copy of the work that's been done thus far
go back to "final-activity-stream" and do a pull so I've got all of the edits and changes my team lead has done
do a rebase, which means I'm resetting the base branch of "final-activity-stream" to the newest and coolest version of "code-cleanup." To do that, I'm going to "git rebase code-cleanup."
How's that sound?
First of all, I'm going to do a "pull" create another branch off of my local "final-activity-stream," just so I've got a copy of what I've done so far
Next, I'm going back to my lo
I push "final-activity-stream" up to Github
I do a pull request
the base branch has been updated
my team lead has made some edits to my code
he recommends a rebase
So, here's what I'm thinking as far as what I'm going to do "Git-wise." Tell me if this is on point...
'code-cleanup" is the base branch. I'm going to check that out locally and do a "pull" so everything is up to date
checkout "final-activity-stream," and create another branch off of it, just so I've got a copy of the work that's been done thus far
go back to "final-activity-stream" and do a pull so I've got all of the edits and changes my team lead has done
do a rebase, which means I'm resetting the base branch of "final-activity-stream" to the newest and coolest version of "code-cleanup." To do that, I'm going to "git rebase code-cleanup."
How's that sound?
First of all, I'm going to do a "pull" create another branch off of my local "final-activity-stream," just so I've got a copy of what I've done so far
Next, I'm going back to my lo
ASKER
Good grief...!
That's what happens when the wind is out of your sails and you're still trying to function.
Here's the full sequence I was planning:
1) First of all, I'm going to create another branch off of my local "final-activity-stream," just so I've got a copy of what I've done so far
2) Then I'm going back to my local "final-activity-stream" and do a pull, so I've got my work plus my supervisor's edits
3) Next, check out "code-cleanup" and do a pull, so I've got the best and the brightest on what is my base branch
4) Finally, go out to "final-activity-stream" - what is now updated according to my supervisor's edits - and do a rebase
That's the plan. Is that what somebody would do if they're using Git correctly?
That's what happens when the wind is out of your sails and you're still trying to function.
Here's the full sequence I was planning:
1) First of all, I'm going to create another branch off of my local "final-activity-stream," just so I've got a copy of what I've done so far
2) Then I'm going back to my local "final-activity-stream" and do a pull, so I've got my work plus my supervisor's edits
3) Next, check out "code-cleanup" and do a pull, so I've got the best and the brightest on what is my base branch
4) Finally, go out to "final-activity-stream" - what is now updated according to my supervisor's edits - and do a rebase
That's the plan. Is that what somebody would do if they're using Git correctly?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Alright, Chris!
I'm taking notes! Thanks!
Here's my next dilemma: https://www.experts-exchange.com/questions/29179943/GIT-I'm-stuck-I-can't-add-reset-or-checkout-How-do-I-get-past-this.html#questionAdd
I'm taking notes! Thanks!
Here's my next dilemma: https://www.experts-exchange.com/questions/29179943/GIT-I'm-stuck-I-can't-add-reset-or-checkout-How-do-I-get-past-this.html#questionAdd
Seems like your question ended abruptly, so not sure what else you're asking.
Generally, you're on the right track. If code-cleanup has moved on since you branched (additional commits), and you need those changes in your final-activity-stream, then you can do a rebase - this will change the base commit that your final-activity-stream has branched from.