Browse Source

feat: update .gitignore, hooks and README ; add README template

master
Dennis Buchhorn 2 years ago
parent
commit
d8c36ed666
6 changed files with 52 additions and 2 deletions
  1. +1
    -0
      .gitea/template
  2. +1
    -1
      .githooks/post-checkout
  3. +1
    -1
      .githooks/pre-commit
  4. +2
    -0
      .gitignore
  5. +4
    -0
      README.md
  6. +43
    -0
      README_PROJECT_TEMPLATE.md

+ 1
- 0
.gitea/template View File

@ -0,0 +1 @@
README_PROJECT_TEMPLATE.md

+ 1
- 1
.githooks/post-checkout View File

@ -5,7 +5,7 @@ listFilesToSubstitute=$(find -name *.gitsubstitute)
listStaticPathFiles=$(git grep -lr --untracked $repoRoot) listStaticPathFiles=$(git grep -lr --untracked $repoRoot)
listStagedFiles=$(git diff --staged --name-only) listStagedFiles=$(git diff --staged --name-only)
staticPathSubstitution="\${REPO_ROOT}"
staticPathSubstitution="\$\$\${GITSUBSTITUTE_REPO_ROOT}"
for entryFileToSubstitute in $listFilesToSubstitute; do for entryFileToSubstitute in $listFilesToSubstitute; do
fullPath="${repoRoot}/${entryFileToSubstitute}" fullPath="${repoRoot}/${entryFileToSubstitute}"


+ 1
- 1
.githooks/pre-commit View File

@ -4,7 +4,7 @@ repoRoot=$(git rev-parse --show-toplevel)
listStaticPathFiles=$(git grep -lr --untracked $repoRoot) listStaticPathFiles=$(git grep -lr --untracked $repoRoot)
listStagedFiles=$(git diff --staged --name-only) listStagedFiles=$(git diff --staged --name-only)
staticPathSubstitution="\${REPO_ROOT}"
staticPathSubstitution="\$\$\${GITSUBSTITUTE_REPO_ROOT}"
for entryStagedFile in $listStagedFiles; do for entryStagedFile in $listStagedFiles; do
for entryStaticPathFile in $listStaticPathFiles; do for entryStaticPathFile in $listStaticPathFiles; do


+ 2
- 0
.gitignore View File

@ -2,6 +2,8 @@
/.metadata/ /.metadata/
/RemoteSystemsTempFiles/ /RemoteSystemsTempFiles/
.analytics .analytics
.Xil/*
vitis_pid*.str
# ignore all log files # ignore all log files
**/*.log **/*.log


+ 4
- 0
README.md View File

@ -2,6 +2,10 @@
Trying to make Vitis more git-friendly. Trying to make Vitis more git-friendly.
## Use this repository as template
When you use this repository as template, in the new created repository you can delete this file and rename `README_PROJECT_TEMPLATE.md` to `README.md`.
### Requirements ### Requirements
- Tested on Vitis 2020.2 - Tested on Vitis 2020.2


+ 43
- 0
README_PROJECT_TEMPLATE.md View File

@ -0,0 +1,43 @@
# ${REPO_NAME}
Created with Vitis Version 2020.2
Created from Template [`${TEMPLATE_NAME}`](${TEMPLATE_LINK})
### Getting started
1. After cloning the repository execute the following commands in the cloned folder:
- `git config --local core.hooksPath .githooks` - set path to git-hooks for this repository.
- `git checkout BRANCH` - checkout the BRANCH you want to work with (e.g. `master`) which create local project files (because the hook script will be executed now ; this could take a while).
2. Open Vitis and select the cloned folder as workspace.
3. Click on `Inport Project`, choose `Import projects from Git` and click `Next >`.
4. Choose `Existing local repository` and click `Next >`.
5. Choose the cloned / workspace folder (should be the only entry) and click `Next >`.
6. Choose `Import existing Eclipse projects` and click `Next >`.
7. Leave everything unchanged and click `Finish`.
### Workflow
- When you want to commit your work, add all files with `git add .` - Not relevant files will be ignored by the `.gitignore` file.
#### Checkout branch
- It is recommended that you follow these steps to checkout a branch:
- Close Vitis.
- Make sure all work is commited.
- Clean up workspace folder with `git clean -dfx`.
- `git checkout BRANCH` - checkout the BRANCH you want to work with (e.g. `master`) which create local project files (because the hook script will be executed now ; this could take a while).
- Follow the instructions in the `Getting started` section from step `2`.

Loading…
Cancel
Save