Cloning and Committing Git Repositories in Ubuntu 14.04

This post contains commands that are working on Ubuntu to commit and update Git repos content from local folders.

Part 1 of 3 : Setting up git on local

$ sudo apt-get install git
$ git config --global user.name "Your name"
$ git config --global user.email "email@domain.com"

Part 2 of 3 : Cloning existing repository in local system

$ mkdir /path/to/local/repo
$ cd /path/to/local/repo
$ git clone https://github.com/repo-path/repo-name.git
$ git init
$ git add .

Part 3 of 3 : Committing files into Git (commonly used)

$ git remote -v
$ git add .
$ git commit -m "Commit Message" -a
$ git push origin master

Reference

  • https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-14-04
  • https://www.digitalocean.com/community/tutorials/how-to-use-git-effectively
  • https://www.digitalocean.com/community/tutorials/how-to-use-git-branches
0

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>