github - How to create a clean theme branch in git which only has one commit (and no pulls from upstream) -
forking prezto
i forked sorin-ionescu/prezto (upstream
) github github account (nasenatmer/prezto) (origin
), cloned locally , started configuring it, adding files, while committing , pushing changes github repo.
configuring local repo
among other things, modified prompt theme want give project , i'd create pull request`. learning github "using pull requests" , tutorial on gun.io, tried create theme branches, commit changes can forward them pull requests on github. however, in meantime, there updates in upstream.
so had following commit history: original checkout - - many "private commits" - - - pull upstream changes
creating theme repo
so in order create theme repo, created branch @ earliest clone upstream called pristine
, won't customise myself. pulled upstream
bring pristine
up-to-date.
from point branched off prompt_jakob_setup
(that's name of prompt file) , committed file it.
the problem of many commits
now, if go github
start pull request theme branch, see two commits today: pulling in upstream
, prompt commit.
i don't think maintainer accept such unprofessional pull request?
the question
what right way create clean themed branch has 1 commit want push upstream?
if don't want upstream merges want git rebase upstream master
.
you can git pull --rebase upstream master
. fetch
before rebase
sure date.
this move commits after commits happened on upstream repo. , not show commit message concerned about. if want change current repo want git reset --hard
commit (undoing merge upstream) , proceed git rebase
. if have pushed these changes own repo on github may have git push --force
overwrite history. (i recommend against doing since repo, should ok.)