git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [New to the mailing list] Searching for help
@ 2019-03-21 14:11 MARIE Alexandre
  2019-03-21 15:59 ` Philip Oakley
  0 siblings, 1 reply; 3+ messages in thread
From: MARIE Alexandre @ 2019-03-21 14:11 UTC (permalink / raw)
  To: git@vger.kernel.org

Hello,

I am searching for help as I made two mistakes, I think.
First I fetched origin in a 'branch' called temp that is in a 'detached head' state.
But I can't delete temp by checking out master.
I don't know how to get rid of this temp detached head.

Second, the detached head causes one issue :

It splits my commits in two, I mean that all the new commits I do are on top of temp detached head but they are not linked.
I can't get through these two issues with google, I don't know why.

Cheers,

Alex

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

* Re: [New to the mailing list] Searching for help
  2019-03-21 14:11 [New to the mailing list] Searching for help MARIE Alexandre
@ 2019-03-21 15:59 ` Philip Oakley
  2019-03-21 16:11   ` MARIE Alexandre
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Oakley @ 2019-03-21 15:59 UTC (permalink / raw)
  To: MARIE Alexandre, git@vger.kernel.org

Hi Alex

On 21/03/2019 14:11, MARIE Alexandre wrote:
> Hello,
>
> I am searching for help as I made two mistakes, I think.
> First I fetched origin in a 'branch' called temp that is in a 'detached head' state.
> But I can't delete temp by checking out master.
> I don't know how to get rid of this temp detached head.
>
> Second, the detached head causes one issue :
>
> It splits my commits in two, I mean that all the new commits I do are on top of temp detached head but they are not linked.
> I can't get through these two issues with google, I don't know why.
>
> Cheers,
>
> Alex

This list is for the development of Git. There is a googlegroups list 
for git users. However..

A detached head simply means that you are looking at a specific commit 
((hash number)), rather than the 'latest commit on the branch'.

You did not say which OS you were on, or if you prefer the command line, 
or a visual  gui to see the current arrangement of your commits - the 
'gitk' viewer is useful for the latter.

If you have already made some commits on the 'detached head' then use 
the 'git branch' command, or 'git checkout -b' to create a branch name 
for your new commits (check the manual). Having named the new commits, 
you can get back to link the bits together. You can use 'cherry-pick' to 
pick of individual commits from that new branch onto the new 
destination, or use rebase if there is a series.


Philip


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

* RE:[New to the mailing list] Searching for help
  2019-03-21 15:59 ` Philip Oakley
@ 2019-03-21 16:11   ` MARIE Alexandre
  0 siblings, 0 replies; 3+ messages in thread
From: MARIE Alexandre @ 2019-03-21 16:11 UTC (permalink / raw)
  To: Philip Oakley, git@vger.kernel.org

Hello Philip

> This list is for the development of Git. There is a googlegroups list
> for git users. However..

Sorry, my mistake, I found this mailing list here[0] where it is written that this is one for asking questions, having comments or reporting bugs.

> A detached head simply means that you are looking at a specific commit
> ((hash number)), rather than the 'latest commit on the branch'.

I think that I kind of understand what is a detached head now, 
but my problem is when I run: 
gitk --all
I still can see the detached head, whether I am on the 'detached head state' or not.

>  You did not say which OS you were on, or if you prefer the command line,
> or a visual  gui to see the current arrangement of your commits - the
> 'gitk' viewer is useful for the latter.

Sorry about that, I am on Debian.

> If you have already made some commits on the 'detached head' then use
> the 'git branch' command, or 'git checkout -b' to create a branch name
> for your new commits (check the manual). Having named the new commits,
> you can get back to link the bits together. You can use 'cherry-pick' to
> pick of individual commits from that new branch onto the new
> destination, or use rebase if there is a series.

The fact is that I fetched a whole rep into a detached head state named temp, but this is not a git branch.
So I am stuck trying to delete this whole rep.
My history is splitted by two by the rep in detached head state.

Thanks for your response.

Alex


[0] https://git-scm.com/community



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

end of thread, other threads:[~2019-03-21 16:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 14:11 [New to the mailing list] Searching for help MARIE Alexandre
2019-03-21 15:59 ` Philip Oakley
2019-03-21 16:11   ` MARIE Alexandre

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).