Skip to content

minus5/tmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

setup

Odem na https://github.com/minus5/tmp i napravim fork. Napravim clone, postavim si origin na $USER. Ovo se obicno zove origin. Da bi bilo jasnie sto je cije ovdje cu koristi $USER i minus5. U github open source svijetu uobicajeno je origin i upstream, ianic ($USER) i minus5 mi daju vise informacija.

cd ~/work/gocode/src/github.com/$USER
git clone [email protected]:$USER/tmp.git -o $USER
git branch -vva

dodam drugi remote (upstream)

git remote add minus5 [email protected]:minus5/tmp.git
git fetch minus5

pogledam sto imam

git branch -vva

radim...

git checkout master
git checkout -b {feature_branch}

povucem promjene koje su u medjuvremenu nastale

git fetch minus5
git checkout master
git merge minus5/master

git checkout {feature_branch}
git rebase master

kreiram pull request

git push -u ianic {feature_branch}

napisat ce mi url za pull request odem tamo i posaljem pull request

Dalje nastavlja onaj koji merge-a. To moze biti ista osoba isti repo, kao u nastavku.

pripremim se za merganje pull requesta editiram .git/config u sekciji [remote "minus5"] mu objasnim da mi skida i pull requeste

fetch = +refs/pull/*/head:refs/pull/minus5/*

napravim branch za merge

git checkout -b m5_master minus5/master
git config push.default upstream

testiram pull request

git fetch minus5   # dovucem pull requeste
git checkout -b 1 pull/minus5/1  # napravim branch od pull requeste

testiram taj branch ….

merge pull requesta

git checkout m5_master
git merge  pull/minus5/1
git push minus5 HEAD:master

nakon sto je merge-an aktualiziram svoj fork

git fetch minus5
git checkout master
git merge minus5/master
git push

pull/merge/fetch

Nakon sto sam prvi puta napravio sve pripreme dalje ide.

napravim pull request

git checkout master
git checkout -b f1 
…
git push -u ianic  f1

pull request na site (napise mi url)

merge pull requesta

git pull minus5   # napise mi da ima novi pull
git checkout m5_master
git merge pull/minus5/2
git push 

aktualiziram fork

git fetch minus5
git checkout master
git merge minus5/master
git push

cleanup

brisanje lokalnog brancha

git branch -d branch_name
git branch -D branch_name  # force

brisanje remote brancha

git push <remote_name> --delete <branch_name>

ako obrisem branch na remote ostane mi lokanlno, to poravnam:

git remote prune <remote_name>

reference:

Github Forking

Git Branching *** required reading

Push Config

About

Repo for testing deploy service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published