# Rewriting history and public-private-ish branches

2 messages from 2011-12-20 to 2011-12-21. Participants: Jay Levitt, Peter Krefting.
Thread: https://gitlist.dev/t/29212

## Jay Levitt, 2011-12-20 12:33

Subject: Rewriting history and public-private-ish branches
Message-ID: <4EF08086.6080606@gmail.com>
URL: https://gitlist.dev/e/4EF08086.6080606%40gmail.com

```
I frequently conflate git-as-version-control with git-as-deployer when I'm 
editing on my Mac but testing on a server.  I'll do things like...


Mac: checkout -b origin/topic-branch
Mac: make a major change, commit and push
server: pull
[do while buggy]
   server: discover a typo
   Mac: fix the typo, commit and push
   server: pull
[end]
Mac: squash commits
Mac: checkout master
Mac: merge topic-branch
Mac: branch -d topic-branch
Mac: push origin :topic-branch

As long as I'm the only one who's seen this "published" history, am I doing 
anything bad? Do I leave any residue behind in the repo?

Jay Levitt

```

## Peter Krefting, 2011-12-21 12:58

Subject: Re: Rewriting history and public-private-ish branches
Message-ID: <alpine.DEB.2.00.1112211356480.17957@ds9.cixit.se>
URL: https://gitlist.dev/e/alpine.DEB.2.00.1112211356480.17957%40ds9.cixit.se
In-Reply-To: <4EF08086.6080606@gmail.com>

```
Jay Levitt:

> As long as I'm the only one who's seen this "published" history, am I doing 
> anything bad?

I do things like that too, and as long as you know what you are doing, it 
usually works fine.

> Do I leave any residue behind in the repo?

As long as you run "git gc" on the repos regularly, it shouldn't really 
matter much. Your abandoned changes will be available through the reflog 
until that expires, and when that has happened "git gc" should remove them 
from the repositories altogether.

-- 
\\// Peter - http://www.softwolves.pp.se/

```
