Re: [git-users] fetched to wrong branch

2016-12-22 Thread Pablo Rodríguez
On 12/20/2016 08:04 AM, Konstantin Khomoutov wrote:
> On Mon, 19 Dec 2016 17:43:18 +0100 Pablo Rodríguez wrote:
> 
>> I have a local repository and a remote at GitHub. My local repo had a
>> master branch and the remote had only a gh-pages branch.
>>
>> I wanted to pull from my gh-pages remote branch (with "git pull origin
>> gh-pages"). I was about to commit on the master branch and I realized
>> I had no local gh-pages branch. So I put a blank message, to avoid
>> commiting to the master branch.
>>
>> I unstaged the changes with "git reset HEAD", but how can I remove the
>> already fetched files. I mean, is there something I have to do after
>> unstaging the fetched files?
> 
> I'm not sure I understood the course of actions but can you elaborate
> on your current situation?  Precisely, when you "unstaged the changes"
> -- are those "extraneous" files you asking about now untracked or
> tracked with unstaged changes?
> 
> Copying an pasting the output of running
> 
>   git status
> 
> would help immensely.

Many thanks for your reply, Konstantin.

This is what I get:

$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add ..." to include in what will be committed)

Cousine-Bold.ttf
Cousine-BoldItalic.ttf
Cousine-Italic.ttf
Cousine-Regular.ttf
website/

nothing added to commit but untracked files present (use "git add"
to track)

I guess the files are untracked. BTW, unstaging head doesn’t mean
untracking files that were stagged for next commit?

But are the files somehow in my local master branch?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] fetched to wrong branch

2016-12-22 Thread Pablo Rodríguez
On 12/19/2016 06:04 PM, John McKown wrote:
> On Mon, Dec 19, 2016 at 10:43 AM, Pablo Rodríguez wrote:
> [...]
> I wanted to pull from my gh-pages remote branch (with "git pull origin
> gh-pages"). I was about to commit on the master branch and I realized I
> had no local gh-pages branch. So I put a blank message, to avoid
> commiting to the master branch.
> 
> I unstaged the changes with "git reset HEAD", but how can I remove the
> already fetched files. I mean, is there something I have to do after
> unstaging the fetched files?
> 
> ​If I understand you correctly, you want to delete the gh-pages branch
> from "origin" which you accidentally got via a "git fetch"?​

Many thanks for your reply, John,

Sorry, I’m afraid I haven’t explained myself acurately.

Maybe the steps and a final question would be clearer:

1. git pull origin gh-pages
(I ignored that I was pulling to my local master branch.)
2. I left commit comment empty, so no commit was done.
3. git reset HEAD
(I wanted to unstage the fetched files.)

Are the fetched files somewhere in my local master branch?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] fetched to wrong branch

2016-12-19 Thread Konstantin Khomoutov
On Mon, 19 Dec 2016 17:43:18 +0100
Pablo Rodríguez  wrote:

> I have a local repository and a remote at GitHub. My local repo had a
> master branch and the remote had only a gh-pages branch.
> 
> I wanted to pull from my gh-pages remote branch (with "git pull origin
> gh-pages"). I was about to commit on the master branch and I realized
> I had no local gh-pages branch. So I put a blank message, to avoid
> commiting to the master branch.
> 
> I unstaged the changes with "git reset HEAD", but how can I remove the
> already fetched files. I mean, is there something I have to do after
> unstaging the fetched files?

I'm not sure I understood the course of actions but can you elaborate
on your current situation?  Precisely, when you "unstaged the changes"
-- are those "extraneous" files you asking about now untracked or
tracked with unstaged changes?

Copying an pasting the output of running

  git status

would help immensely.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] fetched to wrong branch

2016-12-19 Thread John McKown
On Mon, Dec 19, 2016 at 10:43 AM, Pablo Rodríguez  wrote:

> Dear list,
>
> I have a local repository and a remote at GitHub. My local repo had a
> master branch and the remote had only a gh-pages branch.
>
> I wanted to pull from my gh-pages remote branch (with "git pull origin
> gh-pages"). I was about to commit on the master branch and I realized I
> had no local gh-pages branch. So I put a blank message, to avoid
> commiting to the master branch.
>
> I unstaged the changes with "git reset HEAD", but how can I remove the
> already fetched files. I mean, is there something I have to do after
> unstaging the fetched files?
>

​If I understand you correctly, you want to delete the gh-pages branch from
"origin" which you accidentally got via a "git fetch"?​

I think you want:

git branch -d -r origin/gh-pages

example transcript:

[tsh009@it-johnmckown-linux source]$ git branch -av
* work   6778d27 Total rewrite, from scratch, for MSSDCMP
  remotes/origin/master  021833c add version file
  remotes/origin/mckown5 085c839 Added version file to track work vs. home
changes
  remotes/origin/work6778d27 Total rewrite, from scratch, for MSSDCMP
[tsh009@it-johnmckown-linux source]$ git branch -d -r origin/mckown5
Deleted remote-tracking branch origin/mckown5 (was 085c839).
[tsh009@it-johnmckown-linux source]$ git branch -av
* work  6778d27 Total rewrite, from scratch, for MSSDCMP
  remotes/origin/master 021833c add version file
  remotes/origin/work   6778d27 Total rewrite, from scratch, for MSSDCMP
[tsh009@it-johnmckown-linux source]$




>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
>
>
-- 
Heisenberg may have been here.

http://xkcd.com/1770/

Maranatha! <><
John McKown

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] fetched to wrong branch

2016-12-19 Thread Pablo Rodríguez
Dear list,

I have a local repository and a remote at GitHub. My local repo had a
master branch and the remote had only a gh-pages branch.

I wanted to pull from my gh-pages remote branch (with "git pull origin
gh-pages"). I was about to commit on the master branch and I realized I
had no local gh-pages branch. So I put a blank message, to avoid
commiting to the master branch.

I unstaged the changes with "git reset HEAD", but how can I remove the
already fetched files. I mean, is there something I have to do after
unstaging the fetched files?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.