- Download git installer from https://git-scm.com/download/win and install.....
- Choose Use Git From Git Bash only if you want to use the Git command line tools from Git Bash
or choose Use Git from the Windows Command Prompt if you want to use the Windows Command Prompt
- using choco command
choco install git.install -y
- Open Git Bash
- The first thing you should do when you install Git is to set your user name and email address.
This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:
git config --global user.name "Jerry He" git config --global user.email email@example.com
- Check setting with following command
git config --list
Git Clone from git repository
- Go to Github page and find the repo you want to clone
- click Clone and download button and copy the git URL (choose SSH to clone to repo)
- Generating a new SSH key and adding it to the ssh-agent (https://help.github.com/en/enterprise/2.15/user/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
- Adding a new SSH key to your GitHub account (https://help.github.com/en/enterprise/2.15/user/articles/adding-a-new-ssh-key-to-your-github-account)
ssh-keygen -t rsa -b 4096 -C "firstname.lastname@example.org" eval $(ssh-agent -s) ssh-add ~/.ssh/id_rsa clip < ~/.ssh/id_rsa.pub
- Change directory to ApexOne_Auto and check remote repo should set github as "origin" for push and fetch
Create branch for development
- create a JIRA case for the devlopment and use that JIRA case number to create a new branch. The following demo will take SEG-9999 as an example.
- create branch
git checkout SEG-9999
- set push back the dev branch back to GitHub
git push --set-upstream origin SEG-9999
- ready to work!