Git
Git With Vivado
When you take into account a few basic rules, then it is possible to use git to version your Vivado projects.
- Use a folder structure that keeps all your important files outside the project folder.
Folder structure
- bd: board design files
- ip: source files from vivado ip blocks
- PynqZ2_Blinky_Template.tcl: tcl script to create the Vivado project
- src: (System)Verilog/VHDL source files and version.vh file
- tb: test bench source files
- tcl: tcl files for pre- and post-build scripts, used for versioning of the bitstreams
- xdc: constraints file(s)

- When you want to commit your project, go to File/Project/Write Tcl... Turn off the checkbox 'Copy sources to new project'.
- Always make sure that you create your files (verilog and also block design) outside of the project directory. The Create Block Design dialog gives you the option to select the location, change this to the bd/ folder.
- Use a .gitignore file to make sure the correct files are commited.
You can have a look at this git repository that contains templates for you to start a new project from.
After cloning change the origin to your own git repository.
Experiment with this before you start working on your final project.
Thanks to Stacey from @FPGAsforbeginners for the very good explanation on how to do versioning with AMD/Xilinx tools.