-
Notifications
You must be signed in to change notification settings - Fork 0
Git Setup
Make a personal Fork of Kelly’s Repo: https://github.com/kblincoe/VisualGit_SE701_2019_1. Clone your fork of the repo onto your local machine (You might have to use SSH depending on how your git is set up locally)
- HTTPS:
git clone https://github.com/YOUR_USERNAME/VisualGit_SE701_2019_1.git
- SSH:
git clone [email protected]:YOUR_USERNAME/VisualGit_SE701_2019_1.git
Set your fetch URL to Kelly’s Repo: (You might have to use SSH depending on how your git is set up locally)
- HTTPS:
git remote set-url origin https://github.com/kblincoe/VisualGit_SE701_2019_1.git
- SSH:
git remote set-url origin [email protected]:kblincoe/VisualGit_SE701_2019_1.git
Set your origin URLs to YOUR Repo. This will make both fetch and push URLs for origin your forked repo URL:
git remote set-url origin URL/OF/YOUR/REPO
Check your fetch and push URLs are set correctly:
git remote show origin
You should see something like this:
* remote origin
Fetch URL: [email protected]:YOUR_USERNAME/VisualGit_SE701_2019_1.git
Push URL: [email protected]:YOUR_USERNAME/VisualGit_SE701_2019_1.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
As a further prevention for pushing directly to upstream master, you can block this at a local environment level. Execute git remote set-url upstream --push NO
and you will be unable to push at all to upstream, only fetch from. To verify this has worked, execute git remote -v
. You should see output similar to below.
origin https://github.com/YOUR_USERNAME/VisualGit_SE701_2019_1 (fetch)
origin https://github.com/YOUR_USERNAME/VisualGit_SE701_2019_1 (push)
upstream https://github.com/kblincoe/VisualGit_SE701_2019_1 (fetch)
upstream NO (push)
The next thing you should do is read Git Flow.
Copyright © Team Project Hype-r Phlame. 2019. All Rights Reserved.