tips:git

This is an old revision of the document!


GIT

NAME=project.git
mkdir $NAME
cd $NAME
git init --bare
mv hooks/post-update* hooks/post-update
chmod +x hooks/post-update
git update-server-info
git remote -v
git remote set-url origin http://git.csgalileo.org/livenet-server.git

check origin

git remote show origin

if prune needed (on server restart apache if dav is used)

git remote prune origin
git push --set-upstream origin master

reference

create locally

git branch [name_of_your_new_branch]
git checkout [name_of_your_new_branch]

create or update remotly

git push origin [name_of_branch]

view remote branches

git fetch -v

fetch remote branches

git checkout -b [branch] origin/[branch]

from feature branch to master

git checkout feature
git merge master
git checkout feature
git rebase -i master
git clone https://github.com/scipioni/home-assistant.git
cd home-assistant
git remote add upstream https://github.com/home-assistant/home-assistant.git
git pull upstream dev
apt install apache2
a2enmod dav_lock dav dav_fs macro
systemctl restart apache2
  • tips/git.1483002851.txt.gz
  • Last modified: 2016/12/29 10:14
  • by scipio