Skip to main content

GIT/GITHUB

GIT for source code management.

To see where is GIT installed:
$ which git

To get the version of GIT:
$ git --version

Configuration:
Three places where GIT stores configuration information
  • System -    /etc/gitconfig
  • User -      ~/.gitconfig
  • Project -  my_project/.git/config
Update configuration:
For System:  $ git config  --system
For User:  $ git config --global
For project:
$ git config
$ git config --global user.name "Mohan Donthabhaktuni"
$ git config --global user.email "mohand.bi@outlook.com"
To view the configuration details:
$ git config user.name   (shows the user name)

To view all the configuration details:
$ git config --list

These configuration details get stored in the .gitconfig file under the users home directory
Setup Auto-completion:
$ ~ mohand$ cd ~
$ ~ mohand$ curl -OL https://githum.com/git/git/raw/master/contrib/completion/git-completion.bash
$ mv ~/git-completion.bash ~/.git-completion.bash

Then add the file to the user's profile
Create a directory for project and initialize:
$ git init
$ pwd
/Users/mohand/Documents/python/.git
$ ls -l
total 24
-rw-r--r--   1 mohand  staff   23 Jan 25 19:00 HEAD
drwxr-xr-x   2 mohand  staff   68 Jan 25 19:00 branches
-rw-r--r--   1 mohand  staff  137 Jan 25 19:00 config
-rw-r--r--   1 mohand  staff   73 Jan 25 19:00 description
drwxr-xr-x  11 mohand  staff  374 Jan 25 19:00 hooks
drwxr-xr-x   3 mohand  staff  102 Jan 25 19:00 info
drwxr-xr-x   4 mohand  staff  136 Jan 25 19:00 objects
drwxr-xr-x   4 mohand  staff  136 Jan 25 19:00 refs

To add a file to the GIT:
$ git add .  (adds all the changes made to the project directory to the GIT repository)

To view all the changes made:
$ git log
commit ea11958a7933ac80f26be3793d91485a99365ef2
Author: Mohan Donthabhaktuni <mohand.bi@outlook.com>
Date:   Mon Jan 25 19:06:01 2016 -0800
Initial commit

$ git log -n 0
$ git log -n 1
$ git log --since=2012-06-16
$ git log --until=2014-01-31
$ git log --grep="Init"

Initialize GIT to track projects

Change to the directory which needs to be tracked by GIT. Typically the final scripts are to be copied to this place to lock them in GIT.

mdontha@L7EIS-IAM002 MINGW64 /c/Work/GIT
$ cd PS

mdontha@L7EIS-IAM002 MINGW64 /c/Work/GIT/PS
$ git init

Initialized empty Git repository in C:/Work/GIT/PS/.git/

Commit Changes

git add .
git commit -m "This is for PS"


Comments

Popular posts from this blog

Installing MYSQL Test Environment on Mac using XAMPP package

SID - SQL Interactive Demonstrator is a web based MYSQL client. Written in PHP. Hence it requires a web server that supports PHP to use it with a standard browser. There is an excellent cross platform package called XAMPP that includes, MYSQL, The Apache Webserver, PHP and a bunch of other things. Steps: 1. Installing XAMPP 2. Setting up MYSQL users 3. Installing SID 1 - Installing XAMPP Make sure that no other web server is running. Also Skype runs (I think this applies to windows only b/c my Skype is still running on my Mac) on the same port as the web server and it will prevent Apache from running. So it turn it off before installing XAMPP. - Download and install XAMPP for OS X from apachefriends.org (or from here http://bw.org/ldcsql/) - Launch the Finder window in Mac. Go to Applications > XAMPP and drag manager-osx application to the task bar - Launch the manager-osx. Provide the administrator password and start the My SQL database from the Manage Servers...

Tableau

Tableau Command Line:     Check the status of Tableau service:           tabadmin status --v       Start/stop/restart Tableau service     tabadmin stop     tabadmin start     tabadmin restart       Saving configuration changes:           tabadmin config Tableau Configuration:     Update Logo:           tabadmin customize sign_in_logo "<png_image_path>"      tabadmin customize header_logo "<png_image_path>"     Configure Tableau Desktop Reporting      Tableau Upgrade:      1. Backup:           tabadmin backup <backupfilename> -d            -d will ...