- Created: Wednesday, 12 July 2017 15:25
- Written by Ragdata
Create A New GitHub Repository
If you haven't already, you need to make sure that you've installed Git - and in particular Git Bash - for your system.
Head to GitHub, login and create a new repository, then open your favourite console and navigate to your project directory:
If you haven't already created a README file for your new repo, you can do so with the following command:
echo "# raw" >> README.md
Now you can create your new local Git repository, and associate it with the remote GitHub repository you created above:
git init git add README.md git commit -a -m "First Commit" git remote add origin https://github.com/Ragdata/my-project.git git push -u origin master
Create a Versioned Branch
Let's say that we've been developing
my-project for some time now and it's ready to be released into the wild as version 1.0.
First step is to create the local branch:
git checkout -b 1.0
And then, of course, we're going to want to make that available via GitHub:
git push -u origin 1.0
This handy snippet allows you to store your credentials so that you don't need to provide them with every request.
It is important to note that this is in no way at all secure ...
git config credential.helper store git push http://example.com/repo.git Username: <type your username> Password: <type your password>
[several days later]
git push http://example.com/repo.git
[your credentials are used automatically]
- << Prev