minte9
LearnRemember



Clone

Prod repository
 
$ cd /z/app/mysite

$ git init

$ git add .

$ git commit -a -m "first"
Bare reposiitory
 
$ git clone --bare /z/app/mysite/ /z/app/_GIT/app.mysite.git

$ cd /z/application/_GIT/app.mysite.git/hooks

$ cp post-update.sample post-update

#!/bin/sh
GIT_WORK_TREE=/z/application/mysite git checkout -f
Dev repository
 
$ cd /y/application/mysite

$ git init

$ git remote add origin /z/app/_GIT/app.mysite.git/

$ git pull origin master
Modify and push files
 
$ git add .

$ git commit -a -m "m"

$ git push origin master
Show origin repository path.
 
git config --get remote.origin.url
Change the origin remote's URL.
 
git remote -v

git remote set-url origin https://github.com/user/repo2.git

git remote -v



  Last update: 297 days ago