Difference between revisions of "GIT"

From ArmadeusWiki
Jump to: navigation, search
m (How to use GIT (Armadeus integrators))
m (U-Boot)
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
We have migrated our Source Code Management tool to GIT scm.
+
[[Category: U-Boot]]
Therefore the Armadeus software release 3.1 is the last one available under SVN management tool.
+
[[Category: BSP]]
 +
[[Category: GIT]]
 +
[[Category: Buildroot]]
 +
 
 +
We have migrated our Source Code Management tool to GIT scm since some time now (Armadeus software release 3.1 was the last one available under SVN management tool).
 
This page aims to help you to use our new GIT tool.
 
This page aims to help you to use our new GIT tool.
  
 
==Install GIT==
 
==Install GIT==
  
Install the following packages if needed:
+
*Install the following packages if needed:
git-core gitk git-gui
+
<pre class="host">
 +
git-core gitk git-gui
 +
</pre>
 +
* If you want to send us patches through email, you will need to install these additional packages:
 +
<pre class="host">
 +
git-email
 +
</pre>
 +
In that case you may need to install/configure ''sendmail'' or ''postfix'' or ''exim'' mail server ([http://www.au.debian.org/releases/stable/s390/ch08s05.html.en]).
  
 
==How to use GIT (for everyone)==
 
==How to use GIT (for everyone)==
Line 14: Line 25:
 
# [http://git-scm.com GIT website]
 
# [http://git-scm.com GIT website]
  
===Developpers===
+
===Basics===
 +
* Update your repository to the latest version on SF:
 +
<pre class="host>
 +
$ git pull
 +
</pre>
 +
 
 +
==How to use GIT (Developers)==
 
*Get the Armadeus GIT/SF repository in the ''armadeus'' directory (will be created):
 
*Get the Armadeus GIT/SF repository in the ''armadeus'' directory (will be created):
{{Note| This is the '''Read Only''' method for people wanting to get the latest features. You won't be able to "push" your modifications directly (send us a patch instead).}}<pre class="host">
+
{{Note| This is the '''Read Only''' method for people wanting to get the latest features. You won't be able to "push" your modifications directly (send us a patch instead).}}
$ git clone git://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus armadeus
+
<pre class="host">
 +
$ git clone git://git.code.sf.net/p/armadeus/code armadeus
 
</pre>
 
</pre>
  
Line 36: Line 54:
 
</pre>
 
</pre>
  
*If git pull fails with an error: "Untracked working tree file '{SOMEFILE}'"
+
*If ''git pull'' fails with an error: "Untracked working tree file '{SOMEFILE}'"
 
<pre class="host">
 
<pre class="host">
 
$ rm -rf {SOMEFILE}
 
$ rm -rf {SOMEFILE}
Line 43: Line 61:
  
 
===Providing modifications===
 
===Providing modifications===
Developpers wanting to propose their development should provide us a patch against the latest GIT revision available.
+
Developers wanting to propose their development should provide us a patch against the latest GIT revision available.
 
The process to follow is:
 
The process to follow is:
* Have a working, let's call it armadeus
+
* Have a working view, let's call it armadeus
* update your views:
+
* update your it:
 
<pre class="host">
 
<pre class="host">
 
$ git pull
 
$ git pull
 
</pre>
 
</pre>
 +
====Quick way====
 
* do your modifications
 
* do your modifications
 
* test them ;-)
 
* test them ;-)
Line 56: Line 75:
 
$ git diff > my_changes.patch
 
$ git diff > my_changes.patch
 
</pre>
 
</pre>
* send it on the armadeus-forum mailing list
+
* send it on the armadeus-forum mailing list with your usual mail client
 
+
====Clean way====
===Armadeus integrators===
+
* create a branch for your work (here ''my_work''):
*Get the GIT/SF repository in Read/Write mode (for integrators only) in the ''armadeus'' directory (will be created):
+
 
<pre class="host">
 
<pre class="host">
$ git clone ssh://USER@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus armadeus
+
$ git branch
 +
* master
 +
$ git branch my_work
 
</pre>
 
</pre>
 +
* make it the working branch:
 +
<pre class="host">
 +
$ git checkout my_work
 +
Switched to branch 'my_work'
 +
$ git branch
 +
  master
 +
* my_work
 +
</pre>
 +
* do a commit for each unitary change
 +
<pre class="host">
 +
$ git add xxx/xxx/xxx
 +
$ git commit -m "blah blah blah"
 +
</pre>
 +
* when work is finished, ask git to generate signed patches (''0001-toto.patch'', ''0002-toto.patch'', one for each commit....):
 +
<pre class="host">
 +
$ git format-patch -M master..my_work -s
 +
</pre>
 +
* then you can send them to the armadeus-forum mailing list (if james.bond@007.com can send mail to this list):
 +
<pre class="host">
 +
$ git send-email --from=james.bond@007.com --to=armadeus-forum@lists.sourceforge.net --smtp-server=smtp.xxx.xx 0001-toto.patch 0002-toto.patch
 +
</pre>
 +
* if your work is accepted, you can rebase your branch and then delete it ?:
 +
TBDJB
 +
http://elinux.org/Git_usage
  
 
==How to use GIT (Armadeus integrators)==
 
==How to use GIT (Armadeus integrators)==
 +
* Get the GIT/SF repository in Read/Write mode (for integrators only) in the ''armadeus'' directory (will be created):
 +
<pre class="host">
 +
$ git clone ssh://USER@git.code.sf.net/p/armadeus/code armadeus
 +
</pre>
 
* Before the first commit, define your global personnal data:
 
* Before the first commit, define your global personnal data:
 
<pre class="host>
 
<pre class="host>
Line 76: Line 124:
 
$ git config --global color.branch auto
 
$ git config --global color.branch auto
 
</pre>
 
</pre>
*Do your changes and commit to your '''local''' repository (here add ''fileorpath''):
+
* Update your repository to the latest version on SF:
 +
<pre class="host>
 +
$ git pull
 +
</pre>
 +
* Do your changes and commit to your '''local''' repository (here add ''fileorpath''):
 
<pre class="host>
 
<pre class="host>
 
$ git add fileorpath
 
$ git add fileorpath
Line 83: Line 135:
 
$ git commit -a -m 'Explain what I changed'        (if you have local modifications (=not versioned files) and wants GIT to ignore them)
 
$ git commit -a -m 'Explain what I changed'        (if you have local modifications (=not versioned files) and wants GIT to ignore them)
 
</pre>
 
</pre>
 
+
* Commit someone else work's:
*Update your repository to the latest version on SF:
+
<pre class="host>
 +
$ git commit -m "Message..." --author "FirstName Name <email@address.com>"
 +
</pre>
 +
* Update your repository to the latest version on SF:
 
<pre class="host>
 
<pre class="host>
 
$ git pull
 
$ git pull
 
</pre>
 
</pre>
 
+
* Push your changes to SF:
*Push your changes to SF:
+
 
<pre class="host>
 
<pre class="host>
 
$ git push
 
$ git push
 
</pre>
 
</pre>
 
+
* Tag a revision:
*Tag a revision:
+
 
<pre class="host>
 
<pre class="host>
 
$ git tag -m "Creates TAG for Armadeus 3.1 release" release-3.1
 
$ git tag -m "Creates TAG for Armadeus 3.1 release" release-3.1
 
$ git push --tags origin master
 
$ git push --tags origin master
 +
</pre>
 +
===Commit with someone else identity===
 +
<pre class="host>
 +
$ git commit --author "Firstname Lastname <email@address.com>"
 
</pre>
 
</pre>
  
==GIT to do list==
+
== Links ==
*To update to support git:
+
 
# release/change.sh
+
=== U-Boot ===
# buildroot/target/device/armadeus/linux/kernel-patches/move-patches.sh
+
For the OPOS6UL, OPOS6UL_Nano and the OPOS6UL_SP boards, Armadeus BSP will download U-Boot from specific [https://sourceforge.net/p/armadeus/u-boot/ci/master/tree/ armadeus uboot git] :
 +
<pre>
 +
git clone git://git.code.sf.net/p/armadeus/u-boot armadeus-u-boot
 +
</pre>

Latest revision as of 13:19, 17 September 2018


We have migrated our Source Code Management tool to GIT scm since some time now (Armadeus software release 3.1 was the last one available under SVN management tool). This page aims to help you to use our new GIT tool.

Install GIT

  • Install the following packages if needed:
git-core gitk git-gui
  • If you want to send us patches through email, you will need to install these additional packages:
git-email

In that case you may need to install/configure sendmail or postfix or exim mail server ([1]).

How to use GIT (for everyone)

Tutorials

  1. GIT-SVN Crash course
  2. Everyday GIT With 20 Commands Or So
  3. GIT website

Basics

  • Update your repository to the latest version on SF:
$ git pull

How to use GIT (Developers)

  • Get the Armadeus GIT/SF repository in the armadeus directory (will be created):
Note Note: This is the Read Only method for people wanting to get the latest features. You won't be able to "push" your modifications directly (send us a patch instead).
$ git clone git://git.code.sf.net/p/armadeus/code armadeus
  • Before beginning to do your modifications don't forget to update your view:
 $ git pull
  • If you have modified some armadeus files and want to revert few files only
$ git checkout path_to_file
  • If you have modified some armadeus files and want to revert all your changes
$ git clean -dfx
$ make apf9328_defconfig or make apf27_defconfig
  • If git pull fails with an error: "Untracked working tree file '{SOMEFILE}'"
$ rm -rf {SOMEFILE}
$ git pull

Providing modifications

Developers wanting to propose their development should provide us a patch against the latest GIT revision available. The process to follow is:

  • Have a working view, let's call it armadeus
  • update your it:
$ git pull

Quick way

  • do your modifications
  • test them ;-)
  • do a patch:
$ git diff > my_changes.patch
  • send it on the armadeus-forum mailing list with your usual mail client

Clean way

  • create a branch for your work (here my_work):
$ git branch
* master
$ git branch my_work
  • make it the working branch:
$ git checkout my_work
Switched to branch 'my_work'
$ git branch
  master
* my_work
  • do a commit for each unitary change
$ git add xxx/xxx/xxx
$ git commit -m "blah blah blah"
  • when work is finished, ask git to generate signed patches (0001-toto.patch, 0002-toto.patch, one for each commit....):
$ git format-patch -M master..my_work -s
  • then you can send them to the armadeus-forum mailing list (if james.bond@007.com can send mail to this list):
$ git send-email --from=james.bond@007.com --to=armadeus-forum@lists.sourceforge.net --smtp-server=smtp.xxx.xx 0001-toto.patch 0002-toto.patch
  • if your work is accepted, you can rebase your branch and then delete it ?:
TBDJB

http://elinux.org/Git_usage

How to use GIT (Armadeus integrators)

  • Get the GIT/SF repository in Read/Write mode (for integrators only) in the armadeus directory (will be created):
$ git clone ssh://USER@git.code.sf.net/p/armadeus/code armadeus
  • Before the first commit, define your global personnal data:
$ git config --global user.name "James Bond"
$ git config --global user.email "james.bond@007.com"
  • If you want colors:
$ git config --global color.diff auto
$ git config --global color.status auto
$ git config --global color.branch auto
  • Update your repository to the latest version on SF:
$ git pull
  • Do your changes and commit to your local repository (here add fileorpath):
$ git add fileorpath
$ git commit -m 'Explain what I changed'
or 
$ git commit -a -m 'Explain what I changed'        (if you have local modifications (=not versioned files) and wants GIT to ignore them)
  • Commit someone else work's:
$ git commit -m "Message..." --author "FirstName Name <email@address.com>"
  • Update your repository to the latest version on SF:
$ git pull
  • Push your changes to SF:
$ git push
  • Tag a revision:
$ git tag -m "Creates TAG for Armadeus 3.1 release" release-3.1
$ git push --tags origin master

Commit with someone else identity

$ git commit --author "Firstname Lastname <email@address.com>"

Links

U-Boot

For the OPOS6UL, OPOS6UL_Nano and the OPOS6UL_SP boards, Armadeus BSP will download U-Boot from specific armadeus uboot git :

 git clone git://git.code.sf.net/p/armadeus/u-boot armadeus-u-boot