git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stuck and need unstuck (git checkout)
@ 2013-03-25 17:57 J.V.
  2013-03-30 20:48 ` Phil Hord
  0 siblings, 1 reply; 2+ messages in thread
From: J.V. @ 2013-03-25 17:57 UTC (permalink / raw)
  To: git

I was on a branch (local tracked with remote), and I wanted to checkout 
a remote branch so did:
     $git co myRemoteBranch

and got a message that a lot of jar files were being untracked (files 
were locked).  I had a server running that had some of the jar files 
locked, so it could not update and untracked them all.

What I want to do now is:
     1. switch branches
     2. delete this locally created branch
     3.  re-check out again so all will be well.

I cannot switch branches because it says my untracked files will be 
overwritten.  How do I switch branches? I have no commits to make and 
simply want to go back.  git reset and git stash do not get me there.

thanks

J.V.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: stuck and need unstuck (git checkout)
  2013-03-25 17:57 stuck and need unstuck (git checkout) J.V.
@ 2013-03-30 20:48 ` Phil Hord
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Hord @ 2013-03-30 20:48 UTC (permalink / raw)
  To: J.V.; +Cc: git

On Mon, Mar 25, 2013 at 1:57 PM, J.V. <jvsrvcs@gmail.com> wrote:
> I was on a branch (local tracked with remote), and I wanted to checkout a
> remote branch so did:
>     $git co myRemoteBranch
>
> and got a message that a lot of jar files were being untracked (files were
> locked).  I had a server running that had some of the jar files locked, so
> it could not update and untracked them all.
>
> What I want to do now is:
>     1. switch branches
>     2. delete this locally created branch
>     3.  re-check out again so all will be well.
>
> I cannot switch branches because it says my untracked files will be
> overwritten.  How do I switch branches? I have no commits to make and simply
> want to go back.  git reset and git stash do not get me there.

Does 'git checkout --force yourLocalBranch' help?

Phil

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-30 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 17:57 stuck and need unstuck (git checkout) J.V.
2013-03-30 20:48 ` Phil Hord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).