Wednesday, 11 January 2017

Setup git on Linux

On Linux how to: Install and configure git, start controlling existing code, push to a cloud repository e.g.

Install and Configure Github on Linux

The following commands should be run on the command line.

sudo yum install git-all or sudo apt-get install git-all

git config --global color.ui true
git config --global "Kylie Minogue"
git config --global ""
git config --global core.editor nano

Start Controlling Existing Code

cd path/to/code/root
git init
touch .gitignore
nano .gitignore then add what you wish git to ignore e.g. .gitignore, node_modules, .*
git add .
git commit 

Push to Github

Create a repository on then back in the Linux command line:
git remote add origin
git push -u origin master

See my other blog posts on using Git including setting up a workflow with branches