Reputation: 211
Can I have two different files in two branches with Git ?
I mean branch master
have a file named foo
and branch new-master
a file named bar
.
Upvotes: 0
Views: 49
Reputation: 311163
short answer - yes.
create the new-master
branch from the old master
:
git branch new-master
in master
, create foo
:
touch foo
git add foo
git commit -m "added foo"
switch over to new-master
:
git checkout new-master
create bar
:
touch bar
git add bar
git commit -m "added bar"
Upvotes: 2