The goal of this page is to share experience with Git so that users can successfully get the projects from Xilinx and provide Git patches back to Xilinx.
The following link is for Git help on the web.
http://www.kernel.org/pub/software/scm/git/docs
Cloning a Xilinx Repository with Git
git clone git://git.xilinx.com/<project name>
or if the Git port is blocked by your IT group
git clone http://git.xilinx.com/projects/<project name>
The project names can be seen at http://git.xilinx.com.
Creating A Git Patch
1. Make a branch in the repository for the change you desire, named my_change, which is based on one of the original branches in the repository you cloned. For 3rd parties, this will be the lin2.6-xlnx branch in general. This command creates the branch and makes it the active branch.
git checkout –b <my_change> origin/lin26-xlnx
Make the changes to any files or add new files and do your testing.
2. Set your email and your name for commit messages. Git creates a .gitconfig file in the directory specified by the HOME environment variable such that this only has to be done once.
git config --global user.email johndoe@example.com
git config --global user.name 'John Doe'
3. Add any new files to the repository by telling git about them. The following command adds all new files if executed in the root of the linux tree. Specific files may also be added by specifying a path and file name.
git add .
4. Review the changes that will be committed on the next commit command.
git status
5. Commit the files that were changed and added into your local branch of your local repository. A commit should be done when a change is ready to be put in the repository. Keep the granularity of each commit small (a single functional change) as each commit will become a separate patch.
git commit
You will be put into an editor to enter your commit message. There is a specific format that should be followed and illustrated below.
In the following text, “[ ]” denotes a required field and “< >” is an optional field.
Line #1: [kernel architecture]: [subsystem]: <descriptor>: [short summary]
Line #2: blank
Line #3: Several lines: describing the specifics of the change
Line #n: blank
Line #n+1: Signed-off-by: [your name] [<moc.erehwemos|liameruoy#moc.erehwemos|liameruoy>]
Where:
kernel architecture = powerpc
subsystem = Xilinx
descriptor = the driver name, BSP, etc…
short summary = a short text summary of the change
Signed-off-by is the person making change (commit)
Example Commit Message:
powerpc: Xilinx: I2C: forward ported old Xilinx i2c drivers
Used the EDK 10.1 driver and updated the Linux driver
to 2.6. OF (device tree) support is not included and is
coming in the future. It was tested on the ML405.
Signed-off-by: John Linn <moc.xnilix|nnil.nhoj#moc.xnilix|nnil.nhoj>
6. Review the last commit(s).
git log
7. Generate patches for each commit in your branch. A patch file, named *.patch, is generated in the current directory. The following command generates a patch for the last commit. The “1” in the command specifies the number of commit to generate patches for.
git format-patch -1
8. Send the email patch to moc.xnilix|tig#moc.xnilix|tig for review and incorporation back into the Git tree. Using Git to send the email will ensure that it’s format is not altered by email clients such as Outlook.
git send-email --to git@xilinx.com *.patch
Requesting a Pull, For Xilinx Employees Only
The following command will generate a text file that you can sent to moc.xnilix|jnnil#moc.xnilix|jnnil describing the commit(s) that you want pulled from your local git tree.
git request-pull <commit> <your home path for the git tree to pull from> > <filename.txt>
The commit ID needs to be enough of it from the git log command to be unique (5 or 6 digits, or paste the whole ID in). This example assumes that the commits to pull are at the top of the tree as the command also takes a 2nd commit ID, but it defaults to the head so the 2nd commit ID is left out in this example. The path to your git tree needs to be on a network drive so it's accessible by others in Xilinx.
Some help for the command is at this URL.
http://www.kernel.org/pub/software/scm/git/docs/git-request-pull.html





