This is an old revision of the document!


%7b%7btag>development%20git%7d%7d%0d%0a%0d%0a%3d%3d%3d%3d%3d%3d%20Accessing%20the%20FieldTrip%20source%20code%20through%20Git%20%3d%3d%3d%3d%3d%3d%0d%0a%0d%0aThe%20FieldTrip%20code%20is%20accessible%20using%20%5b%5bhttp:git-scm.com/%7cgit%5d%5d%20at%20%5b%5bhttp:github.com/fieldtrip/fieldtrip%7cgithub%5d%5d.%0d%0a%0d%0a

%0d%0aTo%20quickly%20get%20access%20to%20the%20code%2c%20you%20would%20do%20the%20following%20from%20the%20command%20line%20or%20the%20equivalent%20in%20a%20graphical%20git%20interface%2c%20such%20as%20the%20%5b%5bhttps:desktop.github.com%7cGitHub%20desktop%5d%5d.%0d%0a<code>%0d%0agit%20clone%20https:github.com/fieldtrip/fieldtrip%0d%0a</code>%0d%0a%0d%0aNote%20that%20all%20of%20this%20goes%20on%20a%20single%20line%2c%20but%20the%20link%20is%20slightly%20too%20long%20for%20it%20being%20properly%20displayed%20here.%0d%0a%0d%0aThis%20allows%20you%20to%20easily%20track%20the%20changes%20that%20we%20make%20to%20the%20code.%20If%20you%20also%20want%20to%20contribute%20back%2c%20please%20make%20an%20account%20on%20github%2c%20fork%20FieldTrip%20to%20our%20own%20account%20and%20read%20on%20for%20a%20complete%20tutorial.%0d%0a%0d%0a

%0d%0a%0d%0aTo%20keep%20an%20eye%20on%20the%20changes%20to%20the%20code%2c%20you%20can%20follow%20FieldTrip%20on%20%5b%5bhttp:twitter.com/fieldtriptoolbx%7cTwitter%5d%5d.%0d%0a%3d%3d%3d%3d%3d%3d%20Accessing%20the%20FieldTrip%20source%20code%20through%20Git%20%3d%3d%3d%3d%3d%3d%0d%0a%0d%0aThe%20FieldTrip%20code%20is%20accessible%20using%20%5b%5bhttp:git-scm.com/%7cgit%5d%5d%20at%20%5b%5bhttp:github.com/fieldtrip/fieldtrip%7cgithub%5d%5d.%0d%0a%0d%0a%26lt;note%26gt;%0d%0aTo%20quickly%20get%20access%20to%20the%20code%2c%20you%20would%20do%20the%20following%20from%20the%20command%20line%20or%20the%20equivalent%20in%20a%20graphical%20git%20interface%2c%20such%20as%20the%20%5b%5bhttps:desktop.github.com%7cGitHub%20desktop%5d%5d.%0d%0a%26lt;code%26gt;%0d%0agit%20clone%20https:github.com/fieldtrip/fieldtrip%0d%0a%26lt;/code%26gt;%0d%0a%0d%0aNote%20that%20all%20of%20this%20goes%20on%20a%20single%20line%2c%20but%20the%20link%20is%20slightly%20too%20long%20for%20it%20being%20properly%20displayed%20here.%0d%0a%0d%0aThis%20allows%20you%20to%20easily%20track%20the%20changes%20that%20we%20make%20to%20the%20code.%20If%20you%20also%20want%20to%20contribute%20back%2c%20please%20make%20an%20account%20on%20github%2c%20fork%20FieldTrip%20to%20our%20own%20account%20and%20read%20on%20for%20a%20complete%20tutorial.%0d%0a%0d%0a%26lt;/note%26gt;%0d%0a%0d%0aTo%20keep%20an%20eye%20on%20the%20changes%20to%20the%20code%2c%20you%20can%20follow%20FieldTrip%20on%20%5b%5bhttp:twitter.com/fieldtriptoolbx%7cTwitter%5d%5d.%3d%3d%3d%3d%3d%20How%20to%20contribute%20with%20git%20and%20github.com%20%3d%3d%3d%3d%3d%0d%0a%0d%0aWe%20welcome%20the%20contribution%20of%20external%20users%2c%20even%20if%20the%20changes%20consist%20of%20a%20few%20lines%20of%20code.%20The%20git%20version%20control%20system%20offers%20a%20simple%20and%20straightforward%20way%20to%20add%20your%20contribution%20to%20the%20FieldTrip%20toolbox.%0d%0a%0d%0a%3d%3d%3d%3d%20What%20is%20git%3f%20%3d%3d%3d%3d%0d%0a%0d%0a%5b%5bhttp:git-scm.com/%7cgit%5d%5d%20is%20version%20control%20system%20to%20keep%20track%20of%20the%20changes%20to%20files%20and%20maintain%20a%20consistent%20repository%2c%20just%20like%20%5b%5bhttp:subversion.tigris.org/%7csvn%5d%5d.%20While%20svn%20follows%20a%20linear%20approach%20to%20version%2c%20where%20each%20user%20makes%20some%20changes%20to%20the%20main%20code%20and%20then%20a%20second%20user%20can%20make%20some%20other%20changes%2c%20git%20allows%20for%20multiple%20users%20to%20work%20in%20parallel%20and%20then%20merge%20their%20code%20in%20the%20main%20repository.%20This%20approach%20scales%20very%20well%2c%20considering%20that%2c%20for%20example%2c%20the%20%5b%5bhttp:git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git%7cLinux%20kernel%5d%5d%20and%20%5b%5bhttps:android.googlesource.com/%7c%20android%5d%5d%20use%20git.%0d%0a%20%0d%0aThere%20are%20lots%20of%20resources%20available%20on%20the%20internet%20to%20learn%20more%20about%20git.%20The%20starting%20point%20is%20%5b%5bhttp:git-scm.com/documentation%7cthis%20documentation%5d%5d.%20If%20you%20have%20a%20question%2c%20it's%20most%20likely%20already%20being%20answered%20at%20%5b%5bhttp:stackoverflow.com/questions/tagged/git%7cStack%20Exchange%5d%5d.%20git%20is%20extremely%20powerful%20and%20flexible%2c%20so%20the%20following%20tutorial%20will%20give%20only%20the%20most%20basic%20ideas%20and%20tools%20to%20modify%20the%20FieldTrip%20code.%0d%0a%3d%3d%3d%20Basic%20concepts%20%3d%3d%3d%0d%0a%3d%3d%20push%2c%20pull%2c%20clone%20%3d%3d%0d%0agit%20lives%20on%20two%20levels:%0d%0a%20%20-%20on%20your%20local%20computer%0d%0a%20%20-%20on%20a%20remote%20server%0d%0aBoth%20contain%20a%20full%20repository%20of%20the%20whole%20code.%20The%20basic%20idea%20is%20that%20you%20make%20some%20changes%20on%20your%20local%20copy%20and%20then%20send%20them%20to%20the%20remote%20server.%20Sending%20changes%20to%20a%20remote%20repository%20is%20called%20%5b%5bhttp:git-scm.com/docs/git-push%7cpushing%5d%5d%20and%20receiving%20changes%20from%20a%20remote%20repository%20to%20your%20local%20machine%20is%20called%20%5b%5bhttp:git-scm.com/docs/git-pull%7cpulling%5d%5d.%20The%20first%20time%20that%20you%20want%20to%20copy%20a%20complete%20repository%20from%20a%20remote%20server%20to%20your%20local%20machine%2c%20you%20need%20to%20%5b%5bhttp:git-scm.com/docs/git-clone%7cclone%5d%5d%20the%20repository.%0d%0a%3d%3d%20commit%20%3d%3d%0d%0aYour%20local%20repository%20is%20a%20complete%20repository%20of%20the%20whole%20source%20code.%20As%20such%2c%20you%20can%20modify%20some%20files%20(or%20even%20adding%20some%20files)%20and%20then%20include%20these%20changes%20to%20the%20local%20repository.%20This%20procedure%20is%20called%20%5b%5bhttp:git-scm.com/docs/git-commit%7ccommit%5d%5d.%20The%20changes%20that%20are%20committed%20to%20your%20local%20repository%20are%20called%20commits.%0d%0a%3d%3d%20branch%2c%20merge%20%3d%3d%0d%0aOne%20of%20the%20most%20powerful%20features%20of%20git%20is%20the%20idea%20of%20%5b%5bhttp:git-scm.com/book/en/Git-Branching%7cbranching%5d%5d:%20Branching%20means%20you%20diverge%20from%20the%20main%20line%20of%20development%20and%20continue%20to%20do%20work%20without%20messing%20with%20that%20main%20line.%20So%2c%20from%20your%20local%20repository%2c%20you%20can%20create%20a%20new%20branch%2c%20make%20some%20changes%2c%20commit%20them.%20If%20you%20are%20happy%20with%20the%20changes%2c%20you%20can%20%5b%5bhttp:git-scm.com/docs/git-merge%7cmerge%5d%5d%20your%20new%20branch%20with%20the%20main%20development%20line.%20Branches%20are%20very%20flexible%20because%20they%20allow%20you%20to%20develop%20new%20features%20without%20compromising%20the%20main%20repository.%20You%20can%20easily%20switch%20between%20the%20main%20branch%20(often%20called%20master)%20and%20experimental%20branches.%0d%0a%3d%3d%20Main%20commands%20%3d%3d%0d%0aTo%20recap%2c%20the%20main%20commands%20that%20you'll%20need%20here%20are:%0d%0a%20%20*%20clone%20to%20create%20a%20new%20local%20repository%20based%20on%20a%20remote%20repository%0d%0a%20%20*%20push%20to%20send%20your%20local%20changes%20to%20the%20remote%20repository%0d%0a%20%20*%20pull%20to%20receive%20the%20remote%20changes%20on%20your%20local%20repository%20(it%20runs%20two%20processes:%20fetch%2c%20where%20the%20remote%20changes%20are%20downloaded%2c%20and%20merge%2c%20where%20the%20changes%20are%20integrated%20into%20your%20local%20repository)%0d%0a%20%20*%20commit%20to%20add%20some%20changes%20to%20your%20local%20repository%0d%0a%20%20*%20branch%20to%20list%20the%20branches%0d%0a%20%20*%20checkout%20to%20switch%20to%20an%20existing%20branch%0d%0a%20%20*%20checkout%20-b%20to%20create%20a%20new%20branch%0d%0a%20%20*%20merge%20to%20merge%20a%20branch%20with%20your%20main%20local%20repository.%0d%0aYou%20can%20use%20any%20of%20these%20commands%20on%20the%20command%20line%2c%20in%20Linux%20and%20Mac%2c%20by%20doing:%0d%0a

git%20name_of_the_command

%0d%0aFor%20example%2c%20using%0d%0a

git%20checkout%20master

%0d%0ayou%20will%20switch%20from%20a%20side%20branch%20into%20the%20main%20branch%20of%20your%20repository.%0d%0a%0d%0a%3d%3d%3d%3d%20What%20is%20github.com%3f%20%3d%3d%3d%3d%0d%0a%5b%5bhttp:github.com%7cgithub.com%5d%5d%20is%20a%20fast%2c%20intuitive%20and%20popular%20website%20to%20share%20code.%20The%20interface%20is%20clean%20and%20intuitive%2c%20and%20many%20projects%20are%20hosted%20there%2c%20including%20%5b%5bhttps:github.com/fieldtrip/fieldtrip%7cFieldTrip%5d%5d.%20%0d%0a%0d%0a%3d%3d%3d%3d%20How%20to%20add%20a%20feature%20or%20fix%20a%20bug%20%3d%3d%3d%3d%0d%0aYou%20only%20have%20read%20permission%20for%20the%20%5b%5bhttps:github.com/fieldtrip/fieldtrip%7cFieldTrip%5d%5d%2c%20meaning%20that%20you%20cannot%20change%20directly%20the%20code%20of%20the%20FieldTrip%20repository.%20What%20you%20can%20do%2c%20and%20you%20will%20see%20how%20to%20do%20it%20here%2c%20is:%0d%0a%20%20-%20Copy%20the%20FieldTrip%20repository%20under%20your%20private%20account%20on%20github.com%20(this%20is%20called%20forking).%0d%0a%20%20-%20This%20new%20personal%20repository%20will%20become%20your%20remote%20repository.%20You%20will%20need%20clone%20the%20remote%20repository%20onto%20your%20local%20machine.%20%0d%0a%20%20-%20You%20will%20create%20a%20new%20branch%2c%20edit%20some%20files%2c%20commit%20them%20to%20the%20developmental%20branch%20of%20your%20local%20repository.%20%0d%0a%20%20-%20Then%20you%20can%20push%20this%20developmental%20branch%20to%20your%20remote%20repository.%20%0d%0a%20%20-%20You%20will%20then%20tell%20to%20the%20developers%20of%20FieldTrip%20to%20check%20these%20changes%20in%20your%20remote%20repository%2c%20using%20a%20pull%20request.%0d%0aAll%20the%20underlined%20words%20are%20the%20new%20concepts%20explained%20above.%20Forking%20and%20pull%20request%20are%20two%20main%20concepts%20when%20working%20with%20multiple%20remote%20repositories.%20I%20will%20use%20them%20throughout%20the%20tutorial%20and%20are%20the%20words%20that%20you%20will%20need%20to%20successfully%20google%20possible%20problems.%20If%20they%20are%20not%20clear%2c%20refer%20to%20the%20main%20%5b%5bhttp:git-scm.com/documentation%7cdocumentation%5d%5d.%20%0d%0a%0d%0a%3d%3d%3d%3d%3d%20Tutorial%20%3d%3d%3d%3d%3d%0d%0aNow%20that%20the%20main%20concepts%20are%20explained%2c%20we%20will%20try%20to%20add%20a%20new%20feature%20to%20FieldTrip%20using%20a%20minimal%20example.%20In%20our%20case%2c%20what%20we%20think%20that%20FieldTrip%20really%20needs%20is%20that%20when%20you%20run%20%5b%5b:reference:ft_defaults%5d%5d%2c%20you%20get%20a%20text%20saying%20Welcome%20to%20FieldTrip.%20So%20we%20need%20to%20create%20a%20new%20function%20that%20prints%20Welcome%20to%20FieldTrip%20and%20modify%20the%20existing%20function%20%5b%5b:reference:ft_defaults%5d%5d%20to%20run%20our%20new%20function.%20We%20expect%20that%20you%20already%20have%20git%20running%20on%20your%20system%20(see%20%5b%5bhttp:git-scm.com/book/en/Getting-Started-Installing-Git%7cinstallation%20instructions%5d%5d)%20and%20that%20you%20have%20an%20account%20on%20%5b%5bhttp:github.com%5d%5d%20(see%20%5b%5bhttps:help.github.com/articles/set-up-git%7cset%20up%20git%5d%5d).%20Let's%20say%20that%20your%20username%20on%20github%20is%20USERNAME.%0d%0a%0d%0a%3d%3d%3d%3d%201.%20Fork%20the%20main%20FieldTrip%20%3d%3d%3d%3d%0d%0aGo%20with%20your%20web%20browser%20to%20%5b%5bhttps:github.com/fieldtrip/fieldtrip%5d%5d%20and%20click%20on%20the%20right-hand%20side%2c%20towards%20the%20top%2c%20on%20fork.%20This%20will%20create%20a%20new%20remote%20repository%20in%20your%20github%20account%20at%20the%20address:%20https:github.com/USERNAME/fieldtrip.%20The%20title%20of%20your%20repository%20will%20say:%0d%0a<code>%0d%0ausername%20/%20fieldtrip%0d%0aforked%20from%20fieldtrip/fieldtrip%0d%0a</code>%0d%0a%0d%0a%3d%3d%3d%3d%202.%20Clone%20your%20remote%20repository%20%3d%3d%3d%3d%0d%0aNow%20you%20can%20just%20clone%20your%20remote%20repository.%20There%20are%20two%20equivalent%20methods%20to%20connect%20to%20your%20remote%20repository:%20https%20(see%20%5b%5bhttps:help.github.com/articles/set-up-git%7csetup%20instructions%5d%5d)%20or%20ssh%20(see%20%5b%5bhttps:help.github.com/articles/generating-ssh-keys%7csetup%20instructions%5d%5d).%20If%20you're%20using%20https%2c%20then:%0d%0a<code>%0d%0agit%20clone%20https:github.com/USERNAME/fieldtrip.git%0d%0a</code>%0d%0aIf%20you're%20using%20SSH%2c%20use:%0d%0a

%0d%0agit%20clone%20git%40github.com:USERNAME/fieldtrip.git%0d%0a

%0d%0aNow%20you%20have%20a%20local%20repository%20of%20FieldTrip%20that%20you%20can%20work%20on.%20Then%20go%20into%20the%20just-created%20FieldTrip%20directory:%0d%0a

%0d%0acd%20fieldtrip%0d%0a

%0d%0a%0d%0a%3d%3d%3d%3d%203.%20Create%20an%20experimental%20branch%20%3d%3d%3d%3d%0d%0aBefore%20you%20start%20editing%20files%2c%20create%20a%20new%20branch.%20We%20will%20call%20our%20new%20branch%20welcome.%20Let's%20create%20it:%0d%0a

%0d%0agit%20checkout%20-b%20welcome%0d%0a

%0d%0aand%20it'll%20tell%20you:%0d%0a

%0d%0aSwitched%20to%20a%20new%20branch%20'welcome'%0d%0a

%0d%0aIf%20you%20have%20filed%20a%20bug%20on%20%5b%5b/bugzilla%7cBugzilla%5d%5d%2c%20you%20could%20name%20your%20new%20branch%20bugXXXX%20where%20XXXX%20is%20the%20number%20of%20the%20bug.%0d%0a%0d%0a%3d%3d%3d%3d%204.%20Add%20and%20edit%20files%20%3d%3d%3d%3d%0d%0aNow%20we%20need%20to%20create%20a%20function%20that%20says%20Welcome%20to%20FieldTrip.%20Let's%20call%20it%20ft_welcome.m%2c%20just%20as%20you'd%20create%20any%20new%20Matlab%20function.%20%0d%0a

%0d%0aWhen%20you%20create%20a%20new%20function%20or%20edit%20an%20existing%20one%2c%20follow%20the%20%5b%5b/development/guidelines/code%7ccode%20guidelines%5d%5d%20for%20a%20consistent%20and%20readable%20code.%0d%0a

%0d%0aIn%20addition%20to%20this%20function%2c%20we%20will%20also%20modify%20the%20function%20%5b%5b:reference:ft_defaults%5d%5d.%20%0d%0a%0d%0a%3d%3d%3d%3d%205.%20Commit%20your%20changes%20%3d%3d%3d%3d%0d%0aTo%20see%20how%20git%20reacts%20to%20this%20changes%2c%20you%20can%20now%20type:%0d%0a

%0d%0agit%20status%0d%0a

%20%0d%0aIt%20will%20tell%20you:%0d%0a

%0d%0a%23%20On%20branch%20welcome%0d%0a%23%20Changes%20not%20staged%20for%20commit:%0d%0a%23%20%20%20(use%20%22git%20add%20<file>...%22%20to%20update%20what%20will%20be%20committed)%0d%0a%23%20%20%20(use%20%22git%20checkout%20--%20<file>...%22%20to%20discard%20changes%20in%20working%20directory)%0d%0a%23%0d%0a%23%09modified:%20%20%20ft_defaults.m%0d%0a%23%0d%0a%23%20Untracked%20files:%0d%0a%23%20%20%20(use%20%22git%20add%20<file>...%22%20to%20include%20in%20what%20will%20be%20committed)%0d%0a%23%0d%0a%23%09ft_welcome.m%0d%0ano%20changes%20added%20to%20commit%20(use%20%22git%20add%22%20and/or%20%22git%20commit%20-a%22)%0d%0a

%0d%0aIf%20you%20want%20to%20review%20the%20changes%20you%20made%2c%20you%20can%20type:%0d%0a

%0d%0agit%20diff%0d%0a

%0d%0aNow%20we%20add%20our%20changes%20to%20the%20commit:%0d%0a

%0d%0agit%20add%20ft_welcome.m%20ft_defaults.m%0d%0a

%0d%0aand%20now%20git%20status%20will%20tell%20you:%0d%0a

%0d%0a%23%20On%20branch%20welcome%0d%0a%23%20Changes%20to%20be%20committed:%0d%0a%23%20%20%20(use%20%22git%20reset%20HEAD%20<file>...%22%20to%20unstage)%0d%0a%23%0d%0a%23%09modified:%20%20%20ft_defaults.m%0d%0a%23%09new%20file:%20%20%20ft_welcome.m%0d%0a%23%0d%0a

%0d%0aYou%20can%20now%20commit%20these%20changes.%0d%0a

%0d%0agit%20commit%20-m%20%22print%20welcome%20message%20when%20executing%20ft_defaults%22%0d%0a

%0d%0awhere%20the%20option%20-m%20allows%20you%20to%20add%20a%20log%20entry.%0d%0a

%0d%0aFollow%20these%20%5b%5b/development/guidelines/code%23svn_log_messages%7cguidelines%5d%5d%20when%20writing%20a%20log%20entry.%0d%0a

%0d%0aand%20git%20will%20return:%0d%0a

%0d%0a%201%20file%20changed%2c%201%20insertion(%2b)%0d%0a%20create%20mode%20100644%20ft_welcome.m%0d%0a

%0d%0a%0d%0a%3d%3d%3d%20Switch%20to%20master%20%3d%3d%3d%0d%0aWhile%20you%20are%20working%20on%20the%20developmental%20branch%20called%20welcome%2c%20you%20might%20want%20to%20run%20some%20analysis%20on%20the%20main%20branch%20(called%20by%20default%20master).%20You%20can%20easily%20switch%20into%20the%20main%20branch%20with:%0d%0a

%0d%0agit%20checkout%20master%0d%0a

%0d%0aand%20then%20you%20go%20back%20to%20the%20developmental%20branch%20with%0d%0a

%0d%0agit%20checkout%20welcome%0d%0a

%0d%0aYou%20see%20on%20which%20branch%20you%20are%20with%0d%0a

%0d%0agit%20branch%0d%0a

%0d%0aSwitching%20between%20branches%20is%20really%20fast%2c%20so%20do%20not%20be%20afraid%20of%20doing%20it%20when%20necessary.%0d%0a%0d%0a%3d%3d%3d%3d%206.%20Push%20the%20commits%20%3d%3d%3d%3d%0d%0aWe%20modified%20our%20local%20repository%20but%20the%20remote%20repository%20has%20not%20changed.%20We%20need%20to%20push%20our%20commits%20to%20the%20personal%20remote%20repository.%20By%20default%2c%20the%20remote%20repository%20is%20called%20origin.%20You%20can%20rename%20it.%20If%20you%20want%20more%20information%20about%20remote%20repository%2c%20just%20type:%0d%0a

%0d%0agit%20remote%20-v%0d%0a

%0d%0aThe%20code%20to%20push%20commits%20is:%0d%0a

%0d%0agit%20push%20origin%20welcome%0d%0a

%0d%0awhich%20means%20that%20we%20are%20pushing%20the%20commits%20in%20the%20branch%20called%20welcome%20to%20the%20remote%20repository%20called%20origin.%20This%20will%20create%20a%20new%20branch%20in%20your%20remote%20repository%2c%20as%20the%20last%20line%20of%20the%20output%20will%20kindly%20tell%20you:%0d%0a

%0d%0a...%0d%0a%20*%20%5bnew%20branch%5d%20%20%20%20%20%20welcome%20->%20welcome%0d%0a

%0d%0a%0d%0a%3d%3d%3d%3d%207.%20Make%20a%20pull%20request%20%3d%3d%3d%3d%0d%0aGo%20to%20%5b%5bhttps:github.com%7cgithub.com%5d%5d%20to%20review%20the%20changes.%20By%20default%20on%20the%20webpage%2c%20you%20are%20shown%20the%20branch%20master%2c%20so%20you%20should%20switch%20to%20the%20newly%20created%20branch%20called%20welcome.%20Review%20the%20commits%2c%20by%20clicking%20on%20commits.%20Click%20on%20pull%20request%20in%20the%20top%20middle.%20The%20next%20page%20will%20show%20you%20the%20changes%20that%20are%20part%20of%20the%20pull%20request.%20%0d%0a<note%20important>%0d%0aYou%20are%20about%20to%20send%20the%20changes%20to%20the%20main%20developers%20of%20FieldTrip%2c%20so%20explain%20in%20the%20box%20what%20you%20did%20and%20why.%20Please%2c%20review%20the%20commits%20very%20carefully%20before%20sending%20the%20pull%20request.%20It%20happens%20that%20you%20have%20commits%20that%20you%20forgot%20about%20and%20you%20did%20not%20intend%20to%20share.%20%0d%0a</note>%0d%0aDo%20not%20click%20on%20Send%20Pull%20Request%20when%20finishing%20this%20tutorial.%0d%0a%3d%3d%3d%3d%208.%20Clean%20up%20%3d%3d%3d%3d%0d%0aWhen%20you%20are%20done%2c%20you%20can%20delete%20the%20branch%20welcome%20on%20the%20local%20and%20remote%20repository.%20To%20delete%20the%20branch%20on%20your%20local%20and%20remote%20repository%2c%20you%20can%20use:%0d%0a<code>%0d%0agit%20branch%20-D%20welcome%0d%0agit%20push%20origin%20:welcome%0d%0a</code>%0d%0a%0d%0a%3d%3d%3d%3d%209.%20Keeping%20up%20to%20date%20%3d%3d%3d%3d%0d%0aYour%20suggested%20contributions%20to%20FieldTrip%20will%20not%20be%20the%20only%20changes:%20the%20code%20on%20the%20master%20branch%20is%20constantly%20updated.%20This%20means%20that%20you%20should%20regularly%20synchronize%20to%20benefit%20from%20these%20updates%20and%20to%20ensure%20that%20you%20won't%20be%20making%20changes%20to%20an%20outdated%20copy%20of%20the%20code.%20%0d%0a%0d%0a<note%20important>%0d%0aIt%20is%20important%20to%20first%20pull%20the%20changes%20from%20others%20before%20you%20start%20implementing%20your%20own%20changes%2c%20otherwise%20your%20(new)%20changes%20might%20conflict%20with%20already%20accepted%20changes%20to%20the%20code.%0d%0a</note>%0d%0a%0d%0aSynchronizing%20between%20the%20different%20repositories%20is%20done%20by%20using%20your%20local%20(i.e.%20hard%20disk)%20copy%20as%20intermediary.%20By%20default%20your%20personal%20copy%20of%20the%20repository%20on%20github%20will%20be%20called%20the%20origin.%20You%20can%20check%20this%20with%0d%0a%0d%0a%20%20git%20remote%20-v%0d%0a%0d%0awhich%20will%20show%20you%0d%0a%20%20origin%09git%40github.com/USERNAME/fieldtrip.git%20(fetch)%0d%0a%20%20origin%09git%40github.com/USERNAME/fieldtrip.git%20(push)%0d%0aor%20the%20corresponding%20URL%20with%20https%20instead%20of%20git.%0d%0a%0d%0aTo%20synchronize%20with%20the%20official%20fieldtrip%20repository%20on%20github%2c%20you%20should%20also%20add%20it%20as%20a%20remote.%20Best%20practice%20is%20to%20call%20it%20the%20upstream%20repository.%20You%20add%20it%20with%0d%0a%0d%0a%20%20git%20remote%20add%20upstream%20https:github.com/fieldtrip/fieldtrip.git%0d%0a%20%20git%20remote%20-v%0d%0a%0d%0awill%20now%20show%20you%20both%20remotes%0d%0a%0d%0a%20%20origin%09git%40github.com/robertoostenveld/fieldtrip.git%20(fetch)%0d%0a%20%20origin%09git%40github.com/robertoostenveld/fieldtrip.git%20(push)%0d%0a%20%20upstream%09https:github.com/fieldtrip/fieldtrip.git%20(fetch)%0d%0a%20%20upstream%09https:github.com/fieldtrip/fieldtrip.git%20(push)%0d%0a%0d%0aYou%20can%20pull%20(download)%20from%20the%20upstream%20repository%20and%20push%20(upload)%20to%20your%20own%20origin%20repository.%0d%0a%0d%0aTo%20pull%20the%20changes%20from%20the%20master%20branch%20of%20the%20(official)%20upstream%20FieldTrip%20repository%2c%20you%20would%20do%0d%0a%0d%0a%20%20git%20checkout%20master%0d%0a%20%20git%20pull%20upstream%20master%0d%0a%0d%0aThis%20may%20(or%20may%20not)%20show%20changes%20to%20files%20and%20new%20files%20that%20were%20added.%20Subsequently%2c%20you%20can%20push%20those%20changes%20to%20the%20master%20branch%20of%20your%20origin%20personal%20github%20repository%20with%0d%0a%0d%0a%20%20git%20push%20origin%20master%0d%0a%0d%0aAfter%20this%2c%20both%20the%20local%20copy%20on%20your%20hard%20drive%20and%20your%20copy%20on%20%5b%5bhttp:github.com%7cgithub.com%5d%5d%20will%20be%20up%20to%20date%20with%20the%20official%20release.%0d%0a%0d%0aTroubleshooting:%20pushing%20your%20master%20branch%20to%20your%20origin%20personal%20github%20repository%20may%20throw%20the%20error%20%22This%20repository%20is%20configured%20for%20Git%20LFS%20but%20'git-lfs'%20was%20not%20found%20on%20your%20path.%20If%20you%20no%20longer%20wish%20to%20use%20Git%20LFS%2c%20remove%20this%20hook%20by%20deleting%20.git/hooks/pre-push.%22%20This%20.git%20directory%20can%20be%20found%20in%20the%20local%20directory%20of%20your%20repository%20(../fieldtrip/.git).%0d%0a%0d%0aWorking%20with%20remotes%20is%20explained%20in%20more%20detail%20in%20the%20%5b%5bhttp:git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes%7cGit%20book%5d%5d.%0d%0a%0d%0a%3d%3d%3d%3d%3d%20Want%20more%3f%20%3d%3d%3d%3d%3d%0d%0a%5b%5bhttp:github.com%7cgithub.com%5d%5d%20offers%20lots%20of%20documentation.%20In%20particular%2c%20see%20the%20detailed%20instructions%20to%20%5b%5bhttps:help.github.com/articles/fork-a-repo%7cfork%20a%20repository%5d%5d%20and%20to%20%5b%5bhttps:help.github.com/articles/using-pull-requests%7ccreate%20a%20pull%20request%5d%5d.%20If%20you%20plan%20to%20continue%20development%2c%20I%20suggest%20to%20set%20up%20your%20remotes%20with%20origin%20pointing%20to%20your%20personal%20remote%20repository%20and%20upstream%20pointing%20to%20%5b%5bhttps:github.com/fieldtrip/fieldtrip%5d%5d%2c%20as%20described%20in%20%5b%5bhttps:help.github.com/articles/fork-a-repo%7cfork%20a%20repository%5d%5d.