Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Tuesday, June 23, 2015

Update git 1.7 to most recent version 2.0.4 on centos 6 script



  • #install dependencies
  • yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel && yum -y install gcc perl-ExtUtils-MakeMaker
  • #remove old version
  • yum -y remove git
  • #install git 2 most recent src
  • cd /usr/src
  • wget https://www.kernel.org/pub/software/scm/git/git-2.0.4.tar.gz
  • tar xzf git-2.0.4.tar.gz
  • #remove backup
  • rm -f git-2.0.4.tar.gz
  • #build git
  • cd git-2.0.4
  • make prefix=/usr/local/git all
  • make prefix=/usr/local/git install
  • #add to path
  • echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
  • source /etc/bashrc
  • #verify successful installation
  • git --version
  • Tuesday, October 21, 2014

    Git : commit all changes in current directory tree and push to default repository from terminal

    1. #see current changes
    2. git satus
    3. #add changed things to local repo
    4. git add -A
    5. #commit all changes
    6. git commit -a
    7. #see remote repo
    8. git remote
    9. #send to remote repo
    10. git push

    Thursday, September 18, 2014

    Create new repostory at github and add new directory with files from terminal

    Just use this script : committogithub.sh

    1. curl -u $1 https://api.github.com/user/repos -d "{\"name\":\"$2\"}"
    2. git init
    3. git add .
    4. git commit -a -m "added all"
    5. git remote rm origin
    6. git remote add origin "ssh://git@github.com/$1/$2.git"
    7. git remote -v
    8. git push -u origin master

    Or Download it (commitnewfilestogithub.sh)


    Usage : 


    1. sh committogithub.sh username reponame

    Note : Make sure you have setup your ssh correctly for the system you are using at https://github.com/settings/ssh