Difference between revisions of "Git install"

From Wiki2
(Created page with "====git install==== apt-get install git-core =====git prompt===== add to bottom of .bashrc source /etc/bash_completion.d/git #(for Ubuntu 12.04 or less) #source /etc/...")
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
=====git prompt=====
=====git prompt=====
add to bottom of .bashrc
add to bottom of .bashrc
     source /etc/bash_completion.d/git #(for Ubuntu 12.04 or less)
     source /etc/bash_completion.d/git-prompt  
    #source /etc/bash_completion.d/git-prompt (for Ubuntu 13.04 and higher)
     PS1=$PS1'$(__git_ps1 "\[\e[0;33m\](%s) \[\e[0m\]")'
     PS1=$PS1'$(__git_ps1 "\[\e[0;33m\](%s) \[\e[0m\]")'
and uncomment (at around line 39 in .bashrc)
and uncomment (at around line 39 in .bashrc)
Line 10: Line 9:


{{:setup.ssh}}
{{:setup.ssh}}
=====setup .ssh=====
check for .ssh
  ls -a ~/.ssh
if not
  ssh-keygen -t rsa -C "mckenna.tim@gmail.com"
copy the public key to github/account/sshkeys
git config --global user.name "mckennatim"
git config --global user.email "mckenna.tim@gmail.com"

Latest revision as of 17:56, 24 January 2017

git install

apt-get install git-core
git prompt

add to bottom of .bashrc

   source /etc/bash_completion.d/git-prompt 
   PS1=$PS1'$(__git_ps1 "\[\e[0;33m\](%s) \[\e[0m\]")'

and uncomment (at around line 39 in .bashrc)

  force_color_prompt=yes
setup .ssh

check for .ssh

 ls -a ~/.ssh

if not

 ssh-keygen -t rsa -C "mckenna.tim@gmail.com"

copy the public key to github/account/sshkeys

git config --global user.name "mckennatim"
git config --global user.email "mckenna.tim@gmail.com"