Table of Contents |
---|
Squashing commits: combining multiple existing commits
Example: I have three commits on my branch for a single Jira ticket. I would like to squash them into a single commit before creating a pull request.
...
Save and then close the editor.
Fetch another developer's branch for testing
Example: I have been asked to test changes made to IGB on another developers branch as part of a 1st level review.
Find the developers IGB repository URL.
- Go to the developers fork of IGB in a web browser.
- Click the Clone button.
- In the window that opens, select HTTPS in the dropdown and then copy the developers repository URL (for example: https://bitbucket.org/nfreese/nowlanfork-igb.git).
Type the following in a terminal or git bash:
Code Block | ||
---|---|---|
| ||
git fetch https://bitbucket.org/nfreese/nowlanfork-igb.git IGBF-3379:IGBF-3379-myBranch git checkout IGBF-3379-myBranch |
This will fetch the branch IGBF-3379 from the developer's repository, and it will call that branch IGBF-3379-myBranch on your local machine. You can then checkout the branch and test it.
Note: This local branch will not track the developer's remote branch.