4/24/2016 - 10:00 PM

Adding a project to GitHub

Adding a project to GitHub

// Initialized empty Git repository in /home/jc/dotfiles/.git/ for example
> git init

// specify where this is going: 
> git remote add origin git@github.com:jcadima/dotfiles.git

// create a new file in the command line:
touch README.md

now add this new created README.md:
> git add README.md
// to add all files in this repository:
> git add .

// first commit to this repository
> git commit -m "Dot Files first commit"
[master (root-commit) e74f2ba] Dot Files first commit
 3 files changed, 301 insertions(+)
 create mode 100644 .bashrc
 create mode 100644 .vimrc
 create mode 100644 README.md

// push to repository:
> git push -u origin master
Warning: Permanently added the RSA host key for IP address '' to the list of known hosts.
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 4.26 KiB | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
To git@github.com:jcadima/dotfiles.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.