Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Distributed version control systems (DVCS)
12-13-2010, 07:31 AM,
#6
 
I'd say that workflow is over-complicated, at least for git.

Firstly, it's never necessary to keep a local branch of a mainline development tree that you don't touch, because git keeps track of remote branches at the same level as it does local branches. So instead of having remote master (read-only) > remote master (read-write) <> local master <> local topic1..n you can have something like remote master (read-only) > remote master (read-write) <> local topic1..n -- If you want to test the remote master without your changes, you can commit your current changes to your local branch and checkout the remote branch or master directly (into what git refers to as a "detached HEAD"). Similarly you can compare remote and local branches directly using eg. 'git diff'. This won't cost you any extra bandwidth, when you want to get a new copy of the remote branches, you can do so without affecting any local branch whatsoever.

Another thing to note is that superfluous use of rebase is not generally recommended. The reason for this is that what a rebase actually does is it rewrites the history of your local branch so that all of your local changes appear to happen after any remote changes that occurred, and if there are confliciting changes, ie. you and another developer working on the same region of a file, it quickly becomes difficult to recognise where the conflicts were resolved. Rebasing is primarily useful for branches where you pull the remote branch, perform and commit all your changes, get any updates from the remote one time, fix any conflicts, submit a pull request, and never touch that branch again. If you are performing a lot of changes to one branch over time, merging the remote branch in at frequent intervals and fixing merge conflicts along the way gives a clear indication of what had to be changed at what point, reducing the amount of work that has to be done when your branch is merged back into the main development tree.

On a bit of a tangent here, I'd also recommend against creating a fork using github's tools until you're ready to push some changes to it. Git can easily handle multiple remotes, allowing a mix of read-only and writable, and this also makes it easier to avoid having redundant copies of the master branch on your git remote. This is an almost entirely different workflow, though.
Reply


Messages In This Thread
[No subject] - by fudje - 12-12-2010, 10:04 AM
[No subject] - by joevenzon_phpbb2_import3 - 12-12-2010, 02:52 PM
[No subject] - by thelusiv - 12-13-2010, 06:34 AM
[No subject] - by thelusiv - 12-13-2010, 07:06 AM
[No subject] - by fudje - 12-13-2010, 07:31 AM
[No subject] - by fudje - 12-13-2010, 08:22 AM
[No subject] - by thelusiv - 12-13-2010, 07:06 PM
[No subject] - by thelusiv - 12-13-2010, 07:09 PM
[No subject] - by NaN - 12-13-2010, 09:03 PM
[No subject] - by fudje - 12-13-2010, 09:08 PM
[No subject] - by NaN - 12-13-2010, 09:31 PM
[No subject] - by thelusiv - 12-13-2010, 10:01 PM
[No subject] - by NaN - 12-13-2010, 10:14 PM
[No subject] - by fudje - 12-13-2010, 11:28 PM
[No subject] - by joevenzon_phpbb2_import3 - 12-14-2010, 12:03 AM
[No subject] - by fudje - 12-14-2010, 05:01 AM
[No subject] - by fudje - 12-16-2010, 02:31 AM
[No subject] - by thelusiv - 12-16-2010, 10:38 AM
[No subject] - by fudje - 12-16-2010, 05:26 PM
[No subject] - by joevenzon_phpbb2_import3 - 12-17-2010, 11:16 AM
[No subject] - by thelusiv - 12-17-2010, 11:45 AM
[No subject] - by fudje - 12-21-2010, 12:06 AM
[No subject] - by thelusiv - 12-23-2010, 10:59 AM
[No subject] - by fudje - 12-23-2010, 12:00 PM
[No subject] - by thelusiv - 12-24-2010, 12:02 PM
[No subject] - by fudje - 01-17-2011, 09:03 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)