I'm new to git. I'm using bitbucket with sourcetree client. I've cloned the repository from bitbucket in the sourcetree ,and then I wanted to create a Develop branch from Master. The thing is : there isn't any master branch. I've tried committing some text file , and then I was able to create that Develop branch , but I still don't see master branch in BitBucket ,so I can't create pull requests from the Develop branch to master...
What have I done wrong? Thanks
master
is just a name for the usual default branch. But it doesn’t need to be called that way. If you do git branch -r
you can see what branches exist on your remote, so you know which branch you could create a pull request for.
If you really want a master branch, you could just create a new branch.
If you will try to clone the empty repository, while cloning you should be getting the following message in command line prompt.
Cloning into 'test'...
warning: You appear to have cloned an empty repository.
Checking connectivity... done.
So, it means you are starting a project from scratch. In this case you have to follow the following steps -
mkdir /path/to/your/project
cd /path/to/your/project
git init
git remote add origin "Your Repo Url"
git add -A
git commit -m 'Your Commit Message'
git push -u origin master
Same streps are also mentioned in bitbucket home page of your repository. It will create your master branch.
You have to initialize your repository with your username and name, after that your master branch will be created and you will be able to commit your code.
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With