I would recommend checking out some git tutorials, as this question arises from a fundamental misunderstanding of git's behavior. Take this command:
git checkout -b 7.x-1.x
This command takes your existing git repository (i.e. the 6.x-1.x codebase on whatever branch you happened to have checked out), and creates a new branch based on it. Branches in git are little more than pointers to particular commits in history. All you did by issuing that command is create a 7.x-1.x
pointer to your most recent commit. You could verify the pointer by checking the git repository:
cd ajax_links_api
cat .git/refs/heads/7.x-1.x
That command will return a SHA1 hash. That's the commit id to which the 7.x-1.x
branch points.
If you want a blank working directory, i.e. no files at all, create a new, empty repository. If instead you're simply trying to author a new version of your software based on 6.x-1.x
, then you've done exactly what you should. Make any upgrades to those files you want on the 7.x-1.x
branch. When you're ready to merge it back to master
, you can.
These are core concepts in most any version control system, but especially DVCS (Distributed Version Control Systems). I strongly urge reading some of those linked tutorials.