On Linux how to: Install and configure git, start controlling existing code, push to a cloud repository e.g. github.com
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 user.name "Kylie Minogue"
git config --global user.email "kylie@minogue.net"
git config --global core.editor nano
git init
touch .gitignore
nano .gitignore then add what you wish git to ignore e.g. .gitignore, node_modules, .*
git add .
git commit
git remote add origin https://github.com/username/repoName.git
git push -u origin master
See my other blog posts on using Git including setting up a workflow with branches
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 user.name "Kylie Minogue"
git config --global user.email "kylie@minogue.net"
git config --global core.editor nano
Start Controlling Existing Code
cd path/to/code/rootgit 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 github.com then back in the Linux command line:git remote add origin https://github.com/username/repoName.git
git push -u origin master
See my other blog posts on using Git including setting up a workflow with branches
No comments:
Post a Comment