git

2 views
Skip to first unread message

L. V. Lammert

unread,
Jun 20, 2017, 3:14:54 PM6/20/17
to St. Louis Perl Mongers Google Group
Nobody is saying much, and I know there are lot of git folks here so
here's the question:

In the process of migrating a bunch of files to an updated system, there
is a lot of cruft that is extraneous. I'm thinking that the best way to
focus on what's required as well as be the most efficient at getting the
updated system running is to create a new, empty branch and then checkout
files as needed from master.

So, .. is --orphan the best way to accomplish this? Will it work to
checkout files from master into that branch as needed? Or, should I just
create a new branch and git rm * to get started?

Lee

Robert Citek

unread,
Jun 20, 2017, 6:43:40 PM6/20/17
to stl...@googlegroups.com
Hello Lee,

Without knowing more details, I would imagine a variation on the last
method would be the easiest. For example:

git checkout -b clean.branch
git rm -- foo bar bat
git commit -m "clean start"

If you make a mistake, you can always "git checkout -- {filename}"

Good luck and let us know what works for you.

Regards,
- Robert

L. V. Lammert

unread,
Jun 23, 2017, 5:34:50 PM6/23/17
to stl...@googlegroups.com
On Tue, 20 Jun 2017, Robert Citek wrote:

> Hello Lee,
>
> Without knowing more details, I would imagine a variation on the last
> method would be the easiest. For example:
>
> git checkout -b clean.branch
> git rm -- foo bar bat
> git commit -m "clean start"
>
Worked fine, .. the "rm -rf *" is a little scary, but I got over it.

> If you make a mistake, you can always "git checkout -- {filename}"
>
Actually, we will be doing:

git checkout <last branch> filename

to retrieve a copy of each file out of the 500+ as we work; my only
remaining experience gap is when a file is moved from <old> to <new> I
guess the history tracks the version in each branch, so there is no future
relationship between the two versions?

Lee
Reply all
Reply to author
Forward
0 new messages