github release procedure

Johannes Pfau nospam at example.com
Thu Jan 3 11:10:32 PST 2013


Am Thu, 03 Jan 2013 10:54:25 -0800
schrieb Walter Bright <newshound2 at digitalmars.com>:

> On 1/3/2013 3:59 AM, Jacob Carlborg wrote:
> > On 2013-01-03 01:58, Walter Bright wrote:
> >> 2. The:
> >>
> >>     git checkout staging
> >>     git merge master
> >>
> >> It merges master into staging, wiping out my changes in staging,
> >> and does not delete staging. Now that the release is done, we're
> >> done with staging. What is needed is the ability to merge from
> >> staging to master all commits in staging that occurred after it
> >> branched off from master.
> >>
> >> I did this by going through the git commit history and
> >> cherry-picking one by one. There's got to be better way.
> >
> > Can't you just merge staging into master?
> 
> And won't that remove the commits that are in master but not in
> staging?

No, merging will never remove commits. You aren't really supposed to
delete commits in git as it can lead to all kinds of trouble and
therefore deleting has to be done explicitly.

But I still advise not to merge staging into master. As all commits
should go to master first there should be no need to merge back.

If we have commits in staging now which are not in master you can
probably merge them into master. It won't look nice in the git history
but I shouldn't be a real problem.

> 
> I know there need to be push's and pull's. The question is the
> sequence, and the actual commands, like push origin or just push.

The 'remote' to which you push the changes actually depends on your
setup. 'origin' is called a 'remote' and it's the repository where
you've git cloned from. So in a simple setup, it's always push origin.

Git can also 'track' branches. In that case your local branch tracks a
'remote' + branch. In that case you can use git push and it'll push to
the tracked remote branch. If you didn't create the staging branch
manually but just used git checkout staging it should be tracking
origin automatically. Anyway, you can just try git push, as long as you
don't have other remotes than origin, nothing can go wrong.

(you can use git remote to show all remotes)

> 
> The trouble is the wiki lists a sequence of commands, but assumes the
> user realizes that there are a bunch of other commands that need to
> be interleaved.
> 
> Imagine it's a script. Steps cannot be skipped :-)

I'll update the wiki if nobody outpaces me. But I'd like to have some
feedback/conclusion on the staging issue first.


More information about the Digitalmars-d mailing list