s9y/additional_plugins — comment on commit 3241bcb3156a9cc193adff968f09ba039bb85cb0
File:  line 0
By mattsches:

@Ian:
Actually, that's what I did. Normally, I first create a bugfix branch and
merge my changes back to master. Not this time, however.

In the meantime, someone pushed his changes, I pulled, but everything
looked good so far.

When I pushed, I seem to have pushed my complete local master instead of my
single edited file.

So, by doing your changes "quickly" might you might not end up on the safe
side. It's probably better to create a bugfix/feature branch and later
merge or rebase.

As far as I understand it, a merge tries to merge your branch with your
master and creates a new commit containing the merged file(s); whereas a
rebase grabs your whole bugfix branch (from the moment you branched) and
puts it on top of your current master. I'm not sure which solution is
better, but Grischa argues in favor of the latter ;) I fared pretty well
with the merge approach in other projects.

Maybe we should decide on one of the approaches and then document it
somewhere?

- Matthias

Am 3. Januar 2012 17:15 schrieb Ian <
reply@reply.github.com
>:

> @Matthias:
> > I'm still not sure what I did wrong, ...
>
> Well actually it is quite easy, but I don't know if it may differ on
> different OS's.
>
> * You need to clone the repo to your local dir (only once)
> *
> * git pull origin master
> * "quickly" do your fixes to some file(s) using a Unix-LF editor
> * git commit -a -m "this commitments title" (I have a git GUI here)
> * git push
> *
> and hope nobody did push something to that repo in between. You might
> also pull again before push to shrink a possible hook-in-window (I think).
> If you need to know which steps you did in the bash, confirm your
> .bash_history file to find out.
>
> As this is the way I do it (...somehow), there might be better
> solutions, please anyone do not hesitate to correct me here.
>
> So this might lead you to find out what has happened in detail.
>
> @brockhaus:
> I can't tell you where at the moment, as the forum seems to be under
> attack, but I had a similar discussion with Garvin a few days ago...
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/s9y/additional_plugins/commit/3241bcb3156a9cc193adff968f09ba039bb85cb0#commitcomment-833966
>