Monday, June 5, 2017

Setting up fresh github repo


Setting up fresh github repo:


1. first visit github and create a user.

2. visit the url  like https://github.com/user_name_here

3. goto "repositories tab" - click on "new"

4. give a name "my_new_repository"


Avoid adding a README using UI. We will do it later from terminal.

5. Now you should be able to access this link:

https://github.com/user_name_here/new_repo.git



Now, open terminal and follow the *sample* workflow to freshly initialize your github repo:


echo "# simple_testing" >>  README.md
 

git init
 

git add README.md
 

git commit -m "first commit"

git remote add origin git@github.com:user_name_here/simple_testing.git


Another format for add: (this gives authentication failure. Avoid using it)

  git remote add origin https://github.com/user_name_here/simple_testing.git


git push -u origin master
 

Here, simple_testing is the "repo" name created.

No comments:

Post a Comment