While migrating to from bash to zsh, that changed my alias of gl from 'git log' to 'git pull'. I then ran that in my octopress blog, first on branch 'master' and then on branch 'source'
Big mistake. On Github, the origin/master branch is used for deploys, and the origin/source is your blogging source.
On the 'master' branch, I seemed to pull in all the latest commits for Octopress. I'm guessing that I don't need to be concerned with that, since I use the source branch for generation. (Right?)
Next, when doing the pull into my source branch:
- Aborted the merge commit, by hitting :cq in Vim.
- Then I noticed that I got everything that is in my _deploy directory added to the top level directory.
I considered removing the extra directories with git clean, but that seemed to want to delete files/directories that are ignored (use the dry-run option!).
So manually rm -rf the list of directories/files that showed as untracked in git status.
So my git status looks clean now. If I list the remotes, I get this:
$ git remote show origin
* remote origin
Fetch URL: git@github.com:justin808/justin808.github.io.git
Push URL: git@github.com:justin808/justin808.github.io.git
HEAD branch: master
Remote branches:
flattr tracked
master tracked
source tracked
Local branch configured for 'git pull':
source merges with remote master
Local refs configured for 'git push':
flattr pushes to flattr (up to date)
master pushes to master (local out of date)
source pushes to source (up to date)
Anything else I need to check for?
Any way that I can make this more idiot prof so I can't accidentally git a git pull in this setup?
UPDATE
- When I use magit, I see TONS of unpulled and unpushed commits
- My git config has this:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true precomposeunicode = false [remote "octopress"] url = git://github.com/imathis/octopress.git fetch = +refs/heads/*:refs/remotes/octopress/* [branch "source"] remote = origin merge = refs/heads/master [remote "origin"] url = git@github.com:justin808/justin808.github.io.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = octopress merge = refs/heads/master
I'm guessing that the issue is that my source branch should not have
merge = refs/heads/master
Maybe that should be:
merge = refs/heads/source
Or maybe I should simply delete that line? Actually no, as then I don't get proper information in my zsh prompt on if the branch is behind github.