Git : contribution workflow

Need help to contribute to code? Want to help synfig with a patch? Discuss it here.
User avatar
d.j.a.y
Site Admin
Posts: 1356
Joined: Fri Apr 27, 2012 4:35 am
Contact:

Git : contribution workflow

Postby d.j.a.y » Fri Jun 07, 2013 9:09 pm

"git contribution workflow" ... i use it when i have finish something i want to propose for acceptation to synfig / master.
This workflow assume you have forked synfig in github and som other little things.
---------------

Contribution workflow

* check the branch / (fr) verif de branche!
>>terminal<<

Code: Select all

git checkout master

* check file text syntax (space, cr...) / (fr) verif format fichiers (espace / cr ....)
>>terminal<<

Code: Select all

git diff --check

>>ui<<
gitk --> git gui
select file in the no indexed file list you want to commit, if brun color in code part appear, let review code. - refresh with gitk! (ctrl-f5)
(fr) selection dans la liste fichier non indexé des fichiers modifé devant etre commité, si ya du brun dans le source - rafraichissiment avec gitk ! (ctrl-f5)

* verif commit modification in graphic mode / (fr) verification des modification du commit en mode graphique
gitk ---> diff-path

* comment your commit (and also your code ;-) / (fr) commente ton commit (ton code aussi...)
gitk ----> git gui
git gui ---> comment / (fr) commenter

* commit your commit / (fr) commit ton commit
git gui ---> menu / commit / commiter - (ctrl-return)

* check the result / (fr) verification du resultat
gitk , menu / file / reload (ctrl-f5) :
yellow dot, master in bold and commit name (ok), red dot (ko) something not commited?.
point jaune dans gitk , master gras et nom du commit (ok), point rouge si pas bon (ko) truc pas commité?.

get out from the pc ! / (fr) sort la modif de ton ordi !

* check the branch / (fr) verif de branche!
git checkout master

* refresh the code / (fr) rafraichissement du code !

Code: Select all

git fetch upstream

* do rebase / (fr) fait rebase

Code: Select all

git rebase upstream/master

--Nop ! (red dot in gitk, modif cancel or not commited / (fr) point rouge dans gitk, modif non annulé ou commité)
"Cannot rebase: You have unstaged changes. Please commit or stash them."

--Yep! (yellow dot in gitk, master in blod and commit name / (fr) point jaune dans gitk , master gras et nom du commit)
First, rewinding head to replay your work on top of it...
Applying: "your commit comment" / (fr) "votre commentaire de commit"

* push in your gitbase / (fr) pousse sur le serveur git a toi
git push origin master --force
log and pwd required / (fr) login et mot de passe demandé

* it is a time to build ... / (fr) bon c'est quand l'ultime moment de voir si tout fonctionne encore ... hein.
build - release/debug and retest !

* do your pull request / (fr) fait ton pull request
on tha web , connect to git , in you mirror depot hit the pull request button, re-comment and done !
(fr) sur le web, connexion sur git ; depuis ton mirroir "button pull request" recommente ... et hop!

---------
some extra links in bonus
http://git-scm.com/book/fr/Git-distribu ... -un-projet
http://blog.evan.pro/keeping-a-clean-github-fork-part-1
http://genomewiki.ucsc.edu/index.php/Wo ... hes_in_Git
http://tech.m6web.fr/tentative-d-explic ... d-sous-git
https://help.github.com/articles/fetching-a-remote

And another thank's to Genete & Z'gadis for helping me setting that well !
If that solved, please edit initial title adding [SOLVED]

Code: Select all

for each doc in [wiki] ;; if not doc.lang.your ;; then translate(doc, lang.your) ;;

-< Synfig documentation Getting started >-

Advertisement

User avatar
d.j.a.y
Site Admin
Posts: 1356
Joined: Fri Apr 27, 2012 4:35 am
Contact:

Re: Git : contribution workflow

Postby d.j.a.y » Thu Jun 13, 2013 12:54 pm

d.j.a.y wrote:This workflow assume you have forked synfig in github and som other little things.

In the little (very important) things ...this one for example :

a

Code: Select all

git remote rename 'source' 'destination'
with upstream as 'destination' . https://help.github.com/articles/renaming-a-remote

And this very little important things about the upstream name configuration is not clearly signaled anywhere (i mean wiki/search and forum/search )
Should that be added to http://wiki.synfig.org/wiki/Dev:Source_code ?

git(:ya!
If that solved, please edit initial title adding [SOLVED]

Code: Select all

for each doc in [wiki] ;; if not doc.lang.your ;; then translate(doc, lang.your) ;;

-< Synfig documentation Getting started >-

User avatar
Genete
Site Admin
Posts: 5155
Joined: Sat Dec 01, 2007 6:26 am
Location: Spain

Re: Git : contribution workflow

Postby Genete » Thu Jun 13, 2013 2:21 pm


The remote name is something personal and each one can use its own definition. Anyone who knows how to use git should know that 'upstream' or 'origin' is the local name of your remote repository where you push things.
In my case I have it called 'ghorigin' and it stands for: git hub origin. My personal remote is called simply 'genete' ;)
-G
Synfig needs your help!
Developers, packagers, bug testers, translators, artists, web developers, wiki writers... you can contribute! :D


Return to “Coding synfig”

Who is online

Users browsing this forum: No registered users and 1 guest