Let's say I'm going to implement 3 different functions in 3 different files (fileA, fileB fileC) for my new project.
I thought I just needed to add my (currently empty) project in git:
git init
and then create 3 different branches:
git branch file1_branch git branch file2_branch git branch file3_branch
but this does not work:
fatal: Invalid object name: 'master'.
Why is this?
Maybe the problem may be due to the fact that even the master branch has not been created at the moment? I tried to make a git branch . It didn’t give anything.
Then I thought about making an “empty” commit to force git to create a master branch:
git commit -m `initial_commit`
but since I did not add any files to the staging area, it does not work.
Keep in mind that I am going to start my project, so at the moment I have no files to add to commit!
How to solve this problem? Am I doing something wrong?
thank
git version-control
devoured elysium Apr 15 '11 at 15:05 2011-04-15 15:05
source share