Commit to Github

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 .

  1. Go to the folder containing code , which you want to commit.
  2.  sudo apt-get install git   # install git
  3. 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
  4. Next step is to add files to repo
    git add *
  5. Now we are ready to commmit changes
    git commit *
  6. In case you get any fatal error regarding creation of index.lock , userm -f ./.git/index.lock
  7. 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
  8. That’s it. Remember you can always use force , in case you encounter some error and you know the system is wrong 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *