Here are simple steps (only commands) to install ,setup a repo and commit to github . I assume that you are having root access(These instructions are from linux only. ) and a github account .
- Go to the folder containing code , which you want to commit.
- sudo apt-get install git # install git
- Next step is to setup github with your detailsmonai@monai:~/imraw$ git config –global user.name “Your name”
$ git config –global user.email ” your mail ”
$ git config –global credential.helper cache # to remember password
- Next step is to add files to repo
git add *
- Now we are ready to commmit changes
git commit *
- In case you get any fatal error regarding creation of index.lock , userm -f ./.git/index.lock
- Now we are ready to push our changes to github.com
$ git remote add origin https://github.com/yourname/projectname.git
$ git push origin master
- That’s it. Remember you can always use force , in case you encounter some error and you know the system is wrong 🙂