From 920bbf140228b7e9d0f6c08b89447ef98cf18176 Mon Sep 17 00:00:00 2001 From: Stefan Freudenberg Date: Mon, 17 Aug 2020 21:46:43 -0400 Subject: [PATCH] Document using Git (moved from standard project README --- tools/git-setup.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tools/git-setup.md diff --git a/tools/git-setup.md b/tools/git-setup.md new file mode 100644 index 0000000..8773861 --- /dev/null +++ b/tools/git-setup.md @@ -0,0 +1,27 @@ +# Git setup + + +## Tell git who you are + +``` +$ git config --global user.name 'Jean R. Hacker' +$ git config --global user.email 'jean@agaric.com' +``` + +## Create a personal excludesfile (optional) + +``` +$ touch ~/.gitignore +$ git config --global core.excludesfile ~/.gitignore +``` + +Patterns which a user wants git to ignore in all situations (e.g., backup or temporary files generated by the user’s editor of choice) generally go into a file specified by core.excludesfile in the user’s ~/.gitconfig (i.e. in the user's home directory). — [gitignore manual page.](https://git-scm.com/docs/gitignore) + + +## Develop + +Pick a ticket, create a branch referencing the ticket number, e.g. `git checkout -b project-123`. Commit your code in small chunks capturing logical steps and follow the [Drupal coding standards](https://drupal.org/coding-standards) and the [guidelines for commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). All configuration that accompanies your code, e.g. creating fields and content types, must be in the `config` directory or scripted in an update hook. Once your work is done request a review and eventually your code will get merged into the master branch. + +Note: you may need to add your ssh key in the vagrant machine. To do so, inside the repo but outside of the vm, run the `ssh-add` command. + +