On Mon, Dec 19, 2016 at 10:43 AM, Pablo Rodríguez <oi...@web.de> 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/work 6778d27 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.