All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Diamand <luke@diamand.org>
To: deanhiller <dhiller@ghx.com>
Cc: git@vger.kernel.org
Subject: Re: the standard hotfix from production scenario not working for me in git...
Date: Thu, 28 Jul 2011 20:14:37 +0100	[thread overview]
Message-ID: <4E31B51D.2080208@diamand.org> (raw)
In-Reply-To: <1311874508381-6630648.post@n2.nabble.com>

On 28/07/11 18:35, deanhiller wrote:
> I am doing the typical scenario and have tried much of the documentation but
> must be getting something wrong.  I want to do something exactly like
> this...
>
> context: I am on branchBigFeature and a production hot fix comes in.  I
> would like to

0. Would it help to use 'git status' to make sure that you don't have 
untracked flies kicking around?

> 1. git stash --ALL_including_untracked_Files
> 2. git checkout master
> 3. git checkout -b newHotfix145

Can you just do 'git checkout -b newHitfix145 master' ?

> 4. work on hotfix, fix it
> 5. git addANDrm * (is there a way to do this??????)  I don't want to have to
> git rm each file to remove!!! or can I do git rm * ....does that work or
> will that delete everything....ugh.  Better yet, is there a way to git
> commit --skipStaging --includeUntrackedFiles --autoDeleteTheDeletions,
> ie...basically any change in the view I want applied(unless files are in
> .gitignore of course)
> 5. git checkout master
> 6. git merge newHotfix145
> 7. git push
> 8. git checkout branchBigFeature
> 9. git stash pop
> and I am back to seeing all my untracked files.
>
> I tried to do this with commit INSTEAD of stash like so but it failed
> miserably.  I basically tried commit instead of stash and then to get the
> files back to untracked, unversioned on the branchBigFeature, I used git
> revert HEAD and this reverted everything but then it was all in the staging
> area...maybe there is one more command I need to get it from the staging
> area.

Personally I would try to avoid having untracked files around, but maybe 
that's just me.
>
> and one last question, I 90% of the time want to apply all unstaged files
> deletes, adds, modifies...is there just one command I can use like git
> commit * --skipstaging or something.  I have been burned too many times by
> the build works with ALL the changes and then missing a checkin so I prefer
> to check it all in every time and stay in that habit.

I usually find I only have a few untracked files at any given time 
(after all, how fast can most people create new code?) so just keeping 
them tracked isn't a problem. Then 'git commit -a' will do the right 
thing won't it?

Luke

  reply	other threads:[~2011-07-28 19:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 17:35 the standard hotfix from production scenario not working for me in git deanhiller
2011-07-28 19:14 ` Luke Diamand [this message]
2011-07-28 19:25   ` deanhiller
2011-07-28 19:31 ` Andreas Schwab
2011-07-28 20:20   ` deanhiller
2011-07-28 20:28     ` deanhiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E31B51D.2080208@diamand.org \
    --to=luke@diamand.org \
    --cc=dhiller@ghx.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.