Primary tabs
This page gives the essential Git commands for working with this project's source files.
Checking repository branches…
One-time setup
Setting up this repository in your local environment for the first time
If you have just created a project or you already have a local repository, skip this step.
git clone https://git.drupalcode.org/project/addtoany.git addtoany
cd addtoany
Not working for you? See Troubleshooting Git clone. Once it works, you need the Git deploy module. See Versioned dependencies and Git for an explanation.
Routine use
The headings below are not sequential. What you choose to do depends on where you are in your process.
Checking your repository status
To see what you will commit by running git commit and what you could commit by running git add before running git commit.
git status
Switching to a different branch
When you clone the repository you have access to all the branches and tags. The first command shows your choices. The second command makes the switch. See branching and tagging for details.
git branch -a
git checkout <branch-name>
Contributing changes
Contributions are made with merge requests. Open an issue, create a fork from it, push your branch, and open a merge request.
Patching
Getting ready to create or apply patches
If you have not already cloned the repository, follow the directions above for setting up this repository in your local environment. Be sure you are on the branch you wish to patch, then ensure it is up-to-date with the following command:
git pull origin
When you’re done: Reverting uncommitted changes
Revert changes to a specific file:
git checkout <filename>
Revert changes to the whole working tree:
git reset --hard