Add Source to GitHub
Add Source to GitHub
Overview
This page provides detailed instructions on adding EP source to GitHub or a similar Git hosting service.
Git configuration
The following Git configuration is required:
- Your email and password are correctly configured.
- You are able to push changes to the upstream repository.
- Line endings are converted to LF on input. The command to configure this is:
git config --global core.autocrlf input
Steps
- Open a bash shell and cd to the directory containing the projects you will commit to source control. It should contain commerce-engine, cmclient, devops and extensions folders. For EP-for-AMC-Fall-2014-SP2 release package, it will also contain ep-aem-commerce and geometrixx-demo folder.Tip:
On Windows you can use Git Bash, MinGW or Cygwin as your Bash shell.
- Assign execute permissions to all scripts in devops/scripts.
chmod u+x devops/scripts/*.sh
- For each project:
- Create a new empty repository in GitHub and copy the repository's HTTPS clone URL.
- Run the following commands:
# Script MUST be run from the root folder for each project cd <project-root-folder> ./../devops/scripts/add-project-to-git-repository.sh <repository-https-clone-url>
- Navigate to the GitHub settings page and set develop as the default branch.
Tip: Re-running the scriptIf you have made a mistake and the script failed, you need to reset the remote origin URL before re-running the script. The command to do this is:
git remote remove origin