Git is useful tool for versioning projects. The git repository of a project can then be shared using a hosting service, like GitHub. Use it! This section describes a recommended layout of a project that can be version using git and shared with others. It assumes a basic familiarity with git and GitHub. If you do not know how to track a simple file, read the documentation.
The consensus for version control of Xilinx firmware source seems to be to use Vivado in Non-Project Mode. It is a bit more involved and we are still studing on the easiest way to use it. For now, the following is a recommended .gitignore file for a Vivado project.
#
# General
*~
\#*
.\#*
#
# Vivado
*.cache/
*.runs/
#
# PetaLinux
*/*/config.old
*/*/rootfs_config.old
*/*/.metadata
build/
pre-built/linux
images/linux
.petalinux/*
!.petalinux/metadata
*.o
*.jou
*.log
*.a
*.elf
project-spec/meta-plnx-generated/recipes-bsp/device-tree/device-tree-generation_%.bbappend
project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/config.cfg
project-spec/meta-plnx-generated/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend
project-spec/meta-plnx-generated/recipes-kernel/linux/linux-xlnx_%.bbappend
*/*/*/*/*/subdir.mk
*/*/*/.cproject