User Tools

Site Tools


tips:git

**This is an old revision of the document!**

GIT

New repo

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

new remote branch

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]

integrate changes from one branch into another branch

merging

from feature branch to master

git checkout feature
git merge master

or rebasing

git checkout feature
git rebase -i master

Home Assistant

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
tips/git.1480085321.txt.gz · Last modified: by scipio