-
Notifications
You must be signed in to change notification settings - Fork 11
Git Workflow
Just head over to the GitHub page (https://github.com/Impetus/fabric-jdbc-connector) and click the "Fork" button.
git clone https://github.com/YOUR_USERNAME/fabric-jdbc-connector.git
git remote add upstream https://github.com/Impetus/fabric-jdbc-connector.git
- Fetch from upstream remote and merge it to your master
git fetch upstream
git checkout master
git merge upstream/master
git checkout -b newfeature
git fetch upstream
git checkout master
git merge upstream/master
git checkout newfeature
git rebase master
mvn test
mvn verify -P integration-test
https://help.github.com/articles/creating-a-pull-request/
Execute following commands in the branch to be rebased.
git rebase master
Resolve the conflicts if any.
git add <files resolved>
git rebase --continue
Continue above steps for every conflict arised.
Merge remote branch to your local one.
git pull origin <branch>
If conflict arises, resolve it and execute below two commands.
git add <resolved files>
git commit -m "<commit message>"
Push your local changes to remote using below command.
git push -u origin <branch>
Once the Repository maintainer gets a pull request,
Before running the workflow add the following in vim .git/config
fetch = +refs/pull/*/head:refs/pull/upstream/*
After you add your config for upstream will look something like this.
[remote "upstream"]
url = https://github.com/Impetus/fabric-jdbc-connector.git
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/pull/upstream/*
git fetch upstream
git checkout master
git merge upstream/master
git checkout -b pull#9 pull/upstream/9
mvn clean install -P integration-test
git checkout master
git merge pull#9
mvn clean install -P integration-test
git push upstream master
git push origin master
git branch -d pull#9
git fetch upstream
git checkout master
git merge upstream/master
git checkout -b newfeature-test master
git pull https://github.com/forkuser/forkedrepo.git newfeature
mvn clean install -P integration-test
git checkout master
git merge --no-ff newfeature-test
mvn clean install -P integration-test
git push upstream master
git push origin master
git branch -d newfeature-test