| Source codeManagement System
By @khasathan
SWT Tech Share
In software development …
When you want to versioning.How do you do?
SRC/MY_CODE
SRC/- MY_CODE_ORG- MY_CODE_OLD- MY_CODE_NEW- MY_CODE_V1- MY_CODE_V2- MY_CODE_V...
And When you work with your team ...
Have you ever had these problems?
“Ahhh...Yesterday it work. Now, I get some error. Why?”
“I wrote my code here then It's missing.”
“What's changed?”
“This version bugs. We must revert to previous version.”“OMG! I don't back up.”
How we track our code?
Source code Management System
● Collaborate tool● Code versioning● Backup your code
Centralized VS Distributed (1)
Repository
Developers
Centralized VS Distributed (2)
Remoterepository
Localrepository
Localrepository
Localrepository
Localrepository
Master Developers
SCM bacsic concept
● Commit● Branch● Tag
GIT Timeline
Commit Tag
Branch
Why GIT?
● Distributed SCM● Freedom to play● Freedom to branch● Open source● Free code hosting and Collaborate tools
Clone Methods
● HTTP/HTTPS● SSH
Clone via Public Key
Let's Try!
Startup for Exist project (1)
$mkdir my_project/
$cd my_project/
$git init
$git remote add origin http://mydomain.com/user/try_git.git
Startup for Exist project (2)
$touch README
$git add .
$git commit -m “my first commit”
$git push origin master
Clone project from repo
$git clone [email protected]:user/try_git.git
$cd try_git/
...
Ready to work!
Branching
$git branch
* master
$git branch feature1
$git checkout feature1
Switch to branch 'feature1'
GIT Timeline
Feature1 branch
Merging
$git checkout master
Switch to branch 'master'
$git merge feaure1
GIT Timeline
Feature1 merge
Tagging
$git tag v1.0
or
$git tag -a RC1 -m “first release candidate”
GIT Timeline
Tag RC1
Ignoring File
● .gitignore● Accept files your don't automatically add them to repository
Pull Request / Merge Request
● Tell others about changes you've pushed to repository● The way for contributor submit new code to repository
Pull Request Workflows
Remoterepository
Master
Submit request
Feed back to developer
Fork/Clone
Contributor
Can we use GIT as CLI only?
NO! Many GUI programs available
for GIT
GIT UI Clients (1)
GIT UI Clients (2)
Collaborate Tools
● Free code hosting, social coding ● GitHub – public as default, pay for private● BitBucket – private, public project
● Self hosted GIT application e.g. GitLab
GitLab
● GIT (Gitolite)● Wiki● Issues● Code review, comment● Administrator (user, group, project)
GitLab - Overview
GitLab – Navigations (1)
GitLab – Navigations (2)
GitLab – Create Project (1)
GitLab – Create Project (2)
GitLab – Create Project (3)
GitLab – Public Key
GitLab – Dashboard
GitLab – Issue
GitLab – Wiki
Q & A
Top Related