CCS342 DevOps Unit-1 Git CommandsN
CCS342 DevOps Unit-1 Git CommandsN
UNIT-1
INTRODUCTION TO DEVOPS
Download & Install git for Windows
Git Architecture
Basic git commands
Git Config command
Git init command
Git clone command
Git add command
Git commit command
Git status command
Git push Command
Git pull command
Git Branch Command
Git Merge Command
Git log command
Git remote command
Basic Commands
$ pwd
/c/Users/john
$ ls -l
total 16429
drwxr-xr-x 1 john 197609 0 Oct 14 12:55 AppData/
lrwxrwxrwx 1 john 197609 30 Oct 14 12:55 'Application Data' -> /c/Users/menak/AppData/Roaming/
drwxr-xr-x 1 john 197609 0 Oct 14 13:05 Contacts/
lrwxrwxrwx 1 john 197609 28 Oct 14 12:55 'Local Settings' -> /c/Users/menak/AppData/Local/
drwxr-xr-x 1 john 197609 0 Oct 14 13:07 Documents/
drwxr-xr-x 1 john 197609 0 Feb 22 07:44 Downloads/
$ ls -a
./ .p2/ Documents/ 'My Documents’@ OneDrive/ 'Start Menu'@ ntuser.dat.LOG2 ../ .vscode/
Downloads/ NTUSER.DAT PrintHood@ Templates@ ntuser.ini .cache/AppData/
$ git --version
git version 2.43.0.windows.1
$ git config --list
diff.astextplain.textconv=astextplain //conversion filter
filter.lfs.clean=git-lfs clean -- %f //large file storage
filter.lfs.smudge=git-lfs smudge -- %f //smudge filter for file content during transformation
filter.lfs.process=git-lfs filter-process //to process lfs filters
filter.lfs.required=true //filters required/not
http.sslbackend=openssl //for https connections
http.sslcainfo=C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt //ssl certificate verification
core.autocrlf=true //automatic line ending
core.fscache=true //file system cache
core.symlinks=false // symbolic links (branches)
pull.rebase=false //to automate git pull or not
credential.helper=manager //to store & retrieve credentials
credential.https://dev.azure.com.usehttppath=true //HTTP authentication for DevOps
init.defaultbranch=master //default branch name
user.name=sample //username
[email protected] //email
1. Git config command
$ git config --global user.name “sample"
$ git config --global user.email “[email protected]"
Develop Branch
• Parallel to master
• Specify latest delivery development stages for next release
• Finally merged with master when all updates are done and a release version is
tagged.
The Main Branches
• master
• develop
Supportive Branches
Feature Branches
Initiated to specify / add new features.
Deleted once merged with Develop branch.
Release Branches
• Specify new version release.
• Should be deployed to a staging server for testing.
• Developers do bug-fixing and add meta-data.
• Finally merged with Develop branch.
Hotfix Branches
• Created for a new production release.
• Arise for project’s immediate action.
• Fix critical bugs as a branch-off and then merge with master branch with a tag.
Supportive Branches
Supportive Branches
Release branch standards:
• Senior developers will create a release branch.
• Contain the predetermined amount of the feature branch.
• Should be deployed to a staging server for testing.
• Any bugs that need to be improved must be addressed at the release branch.
• The release branch must have to be merged back into developing as well as the
master branch.
• After merging, the release branch with the develop branch must be tagged with
a version number.
Sample project branching model
Sample Git tags