-
Notifications
You must be signed in to change notification settings - Fork 189
Contributor Setup Steps
Important information about Git branch in this document
Although most of the contributions typically target the master branch, the actual branch accepting contributions depends on the Vivado release and needs to be checked on this page.
In this document, the Git branch can be refered as master or <branch> but the exact Git branch name should be used for all the Git commands of this document.
The contributor must follow the following steps to setup the GitHub account and prepare the local repository.
-
Create a github account <USER> from http://www.github.com . For Windows users, download and install git on your machine (GitHub for Windows). For Linux users, a Git client can be downloaded from GitHub if it is not already installed.
-
Ask for permission to XilinxTclStore repository by sending an e-mail to [email protected] with your GitHub username. The permission is needed to be able to send push requests to the Gate Keepers.
-
Sign on to github.com
-
Click Xilinx icon below Organizations at lower left side by your account name <USER>
-
Click XilinxTclStore from the list of Repositories
-
Press "Fork"(upper right hand side) and create fork of XilinxTclStore to your account
-
Switch to a shell on your machine (we recommend GitShell for Windows)
If you have already cloned the repository then skip this step. Otherwise to pull this repository from within a firewall you will need to configure http.proxy and https.proxy as some company might enforce HTTPS over HTTP. Note this setting may be different for your system. If you have questions contact your IT network administrator:
git config --global https.proxy https://proxy:80
git config --global http.proxy http://proxy:80
Note: If you are not sure whether a proxy if needed or not, you should first try to clone the Xilinx repository without setting up the proxy. If git cannot connect to GitHub.com, then the proxy needs to be setup.
#Create and cd to a working directory, for instance ~/github/
mkdir <WORKING_DIR>
cd <WORKING_DIR>
git config --global USER.name <USER> #github USER name
git config --global USER.email your_email@your_company.com
It is recommended to increase the postBuffer size to avoid RPC failues when pushing some large updates to GitHub:
git config --global http.postBuffer 524288000
git config --global https.postBuffer 524288000
- Clone the repository
We recommend working off of only the master branch for simplicity. You can work on a different branch but this requires additional syncing and merging. If you are familiar with this methodology you can use it, otherwise stick with working off the master branch of each repo. You need to clone your fork of the Xilinx master repo to your local area. Don't foget to substitute <USER> for your real github account name:
On Windows
cd <WORKING_DIR>
git clone https://github.com/<USER>/XilinxTclStore.git
On Linux
cd <WORKING_DIR>
git clone https://<USER>@github.com/<USER>/XilinxTclStore.git
You will need to enter your github password when prompted.
Now you have cloned the repo directories under <WORKING_DIR>/XilinxTclStore
cd <WORKING_DIR>/XilinxTclStore
git status
- Set up remote to point to the Xilinx master repo if this has not been done yet. This is required to be able to sync the local repo with the Xilinx master repo
git remote add upstream https://<USER>@github.com/Xilinx/XilinxTclStore.git
- Check out the entire master branch (you can also check out individual files by passing the specific file name). Below is the command for checking out the entire default master branch.
git checkout master
Or
git checkout <branch>
-
Add your application code to the respective directory. For a new app, create the directories following the taxonomy tclapp/<YOUR_COMPANY>/<YOUR_APP> (for an example see tclapp/mycompany/myapp), including test code. Note you can use your github account name in place of <YOUR_COMPANY> if you would like.
For more information on creating application, refer to the following section: How to Contribute a New App
-
Mark files for adding. Make sure you add all necessary files, including the tclIndex, pkgIndex.tcl, and package provider files (3 in addition to the "normal" tcl source files. The tclIndex and pkgIndex.tcl files are generated by Vivado - described later in the section for My First Vivado Tcl App.
cd ./XilinxTclStore
git add tclapp/<YOUR_COMPANY>/<YOUR_APP>
Note: Only files under the app area must be added. For example, none of the files under the catalog directory should be added to the commit. Any pull request that includes file(s) outside of the app area will be rejected.
- Commit to local repository
git commit -m "your description of the changes"
- Push the branch to your forked Github repository <USER>/XilinxTclStore
git push origin master
Or
git push origin <branch>
- Send Pull Request. Switch back to github.com in a web browser, and navigate to your repo
Select the target branch <branch> in the drop down menu before sending the pull request
https://help.github.com/articles/creating-a-pull-request
Press "Pull Request" button right upper-ish
Add any additional note if you wish
Done!