git - Cleaning up a remote tree after a rebase -




after pushing rebase bare remote , running git gc --aggressive --prune=now on remote, else needed force commit history of remote indicate same history new checkout remote would, no indication of rebase? example, needs done on remote remove history , show single squashed commit:

$ mkdir test  $ cd test  $ git init  $ touch foo  $ git add foo  $ git commit -m 'initial commit.'  $ git remote add origin ssh://user@git.domain.com:29418/~user/test.git  $ git push -u origin master  $ in {1..10} > >   echo $i >>foo >   git add -u >   git commit -m "adding $i foo." >   git push origin master > done  $ git reset --soft 99a31c5906f82b333ca5c6204a3f83e3f100d4e7  $ cat foo 1 2 3 4 5 6 7 8 9 10  $ git commit --amend --no-edit  $ git push origin master --force  # on git server inside bare repo:  [root@server test.git]# git log --graph --all --oneline * 8068d90 push * 203f010 push * 58b851d push * 5e385c9 push * 3c3a5b2 push * 5b40efd push * 558d8e1 push * 61e170a push * d1b60df push * 36f44a8 push * 3056f9c push * e9e8fc6 push * e40692c created branch refs/meta/gitblit/reflog * 327e77a initial commit. 





wiki

Comments

Popular posts from this blog

python - Read npy file directly from S3 StreamingBody -

python - Minimize function with Scipy minimize -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -