Last active
October 28, 2016 19:34
-
-
Save ForrestSutton/5541188 to your computer and use it in GitHub Desktop.
Git setup on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install curl git -y | |
| sudo aptitude install git-completion | |
| git config --global color.ui "auto" | |
| git config --global user.name "Forrest Sutton" | |
| git config --global user.email "<email>@gmail.com" | |
| ssh-keygen -t dsa -C "<email>@gmail.com" | |
| git branch newBranch | |
| git checkout master | |
| git merge newBranch | |
| git diff branch1 branch2 | |
| git diff branch1 branch2 -- folder/file | |
| git diff master addUser -- app/controllers/depositors_controller.rb | |
| git fetch ( will grab new files BUT does not merge) | |
| git pull ( performs fetch and merge of all changes, will over right local work) | |
| git push ( if you have permissions, you can push changes to the remote servers) | |
| git branch | |
| git log --author="Forrest Sutton" --pretty=tformat: --numstat | awk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END \ | |
| { printf "added lines: %s removed lines: %s total lines: %s\n",add,subs,loc }' | |
| git log --graph | |
| git remote -vcd git | |
| cd /tmp | |
| git clone git://git.kernel.org/pub/scm/git/git.git | |
| cd git | |
| git checkout v`git --version | awk '{print $3}'` | |
| cp contrib/completion/git-completion.bash ~/.git-completion.bash | |
| cd ~ | |
| rm -rf /tmp/git | |
| echo -e "source ~/.git-completion.bash" >> .profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo apt-get install python3-pip
openssh-client
install docker
for Lamp Stack
sudo apt-get install mysql-server
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo apt-get install php-pear
sudo apt-get install php5-mysql
sudo apt-get install phpmyadmin