Using Git With Drupal

Git is a tool for recording changes to your code.

It's essential for working in teams and recovering from bad changes.

Instructions

  1. Ensure git is installed on the system.
  2. In your terminal, navigate to the project root.
  3. Create a new git repository.
    1. git init
  4. In the web directory, rename example.gitignore to .gitignore.
    1. See the comments in example.gitignore.
  5. Create a .gitignore file in your project root to exclude any additional files.
    1. https://git-scm.com/docs/gitignore
  6. Stage files to commit.
    1. git add .
  7. Commit with message.
    1. git commit -m "Initial commit"

 

 

Tags