"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

February 22, 2020

Git Walk through Examples

1. Create Repository logging into git
2. Add the required code in locally cloned git


3. Add example code file with function and update the code


4. Create branch and checkout code


5. Update code in branch

6. Create Another directory and update code in another branch
7. Overall two branches and two versions of same file


Merge using GIT GUI to master, resolve the conflicts. Simple walkthrough of GIT code management.

Large Commits








Useful tip - Link
1- git stash
2- git add .
3- git commit -m "your commit message"
Force push - git push -f 

More to do

GIT Project Cycle

Git base project
branch 1 dev
branch 2 test
branch 3 uat
branch 4 prod

Checkin Dev code
Move code to QA Branch
Do a Bug fix in QA
Merge QA to Dev

Move QA code to UAT Branch
Do a Bug fix in UAT
Merge UAT to QA, Dev

Move UAT to Prod
Deploy in Prod

1. //pull the latest changes of current development branch if any
git pull (current development branch)

2. //switch to master branch
git checkout master 

3. //pull all the changes if any
git pull

4. //Now merge development into master    
git merge development

5. //push the master branch
git push origin master

Good Read in same lines - Link



Happy Learning!!!

No comments: