tags:

views:

38

answers:

2

What's the git equivalent of the following svn workflow:

1) export foo

2) import bar

Is it the following?

1) checkout master

2) tag foo

3) branch bar

A: 

I think you might be a bit confused, you don't fork local repositories, you branch them.

git branch [branch]
git checkout [branch]

I guess you could push to a remote repo and then "fork" it there, but forks are really just copies. Do a pull on an empty repo and boom, copy.

Josh K
or 'git checkout -b [branch]'=D
Marcelo MD
@Marcelo: I was trying to be verbose for the OP's benefit. ;)
Josh K
A: 

It's simply creating a new repository with git init and then "git pull" the right branch from the other repository. You end up with a new repository containing only the one branch.

jdehaan