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 protected]"

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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

error: Uh oh ...