0

There is a git project on github I want to reorganize for my work. Each time the project is tagged on github, I want to apply my changes to it so that am able to keep my changes current to the original project. I need help with a workflow for this. I am familiar with git basics and nothing advanced. Clear steps would help make this understandable.

solet
  • 19
  • 4
  • 1
    Simply merge the project's changes into your own repository. If you feel funky and prefer a more linear history, use rebase instead of merge. – knittl Jul 20 '15 at 13:18
  • Rebase seems better than merge. What I am hoping for is a workflow of some steps that I can perform from tracking to rebasing each time. I only want to update from a tag from the original project when I know it has been tagged because changes in the original project's master may still be unreleased. – solet Jul 20 '15 at 14:07
  • Or you looking for an automated way to do that or are you asking how to rebase on top of a tag/merge a tag? – knittl Jul 20 '15 at 14:39
  • You might have to clarify what you mean by "reorganize". If you mean moving files/directories or file contents around to create a different layout of the project code, that's not going to be easy to automate. But if you mean something more like rebasing/merging your own private branches to take advantage of upstream changes, that's fairly easy... – twalberg Jul 20 '15 at 15:35
  • @twalberg I want to maintain the code in a different structure than the original. This includes make changes to where folders and files are located. I don't expect that the original project will change that much for structure. – solet Jul 20 '15 at 16:17

1 Answers1

0

Let's suppose you have a remote origin, and you want to update your local master branch with the newer commits from the version v5.0

  1. git fetch
  2. git checkout -b master
  3. git pull --rebase origin v5.0

This way you'll have your local branch updated with all the commits from v5.0 and your commits.

raviolicode
  • 2,155
  • 21
  • 22
  • Hi. Thank you. I think I need to have a remote for the original, a local version that I will need to keep up to date with the last tag, then rebase my master with the tagged version. At least this is what I am getting from reading so far. I think this helps but I may be missing something or this may not be complete. – solet Jul 20 '15 at 16:42
  • Can you add more information in the question as why this is not working for you? Did you clone the repository you're trying to get updates from? – raviolicode Jul 20 '15 at 18:49
  • I found this which is close to what I am looking to do. http://stackoverflow.com/questions/8660883/how-to-achieve-a-private-branch-in-git-that-floats-when-merging-with-upstream but still trying to get this worked out. – solet Aug 09 '15 at 14:28
  • Can you explain what is the difference from that question? If so, please update the question to reflect your problem. – raviolicode Sep 24 '15 at 09:04