@kenji_lozano
@kenji_lozano
Senior Software Developer, Truextend
Angular, React and Java Lover
Javascript Lover
Sucre, Bolivia
Cochabamba
Spring, .NET
Service
Service
Tool
Jorge dile algo!!
Vete a la f*kiu
omaiga enserio!?
Pero hay un Dios
que todo lo ve.
ya cag*eishon
$ git checkout -b myfeature develop
# Switched to a new branch "myfeature"
$ git checkout develop
# Switched to branch 'develop'
$ git merge --no-ff myfeature
# Updating ea1b82a..05e9557
# (Summary of changes)
$ git branch -d myfeature
# Deleted branch myfeature (was 05e9557).
$ git push origin develop
$ git checkout -b release-1.2 develop
#Switched to a new branch "release-1.2"
$ git commit -a -m "Bumped version number to 1.2"
#[release-1.2 74d9424] Bumped version number to 1.2
#1 files changed, 1 insertions(+), 1 deletions(-)
$ git commit -m "Some release commit"
$ git checkout master
#Switched to branch 'master'
$ git merge --no-ff release-1.2
#Merge made by recursive.
#(Summary of changes)
$ git tag -a 1.2
$ git checkout develop
#Switched to branch 'develop'
$ git merge --no-ff release-1.2
#Merge made by recursive.
#(Summary of changes)
$ git checkout -b hotfix-1.2.1 master
# Switched to a new branch "hotfix-1.2.1"
$ git commit -a -m "Bumped version number to 1.2.1"
#[hotfix-1.2.1 41e61bb] Bumped version number to 1.2.1
# 1 files changed, 1 insertions(+), 1 deletions(-)
# ...
$ git commit -m "Fixed severe production problem"
# [hotfix-1.2.1 abbe5d6] Fixed severe production problem
# 5 files changed, 32 insertions(+), 17 deletions(-)
$ git checkout master
# Switched to branch 'master'
$ git merge --no-ff hotfix-1.2.1
# Merge made by recursive.
# (Summary of changes)
$ git tag -a 1.2.1
$ git checkout develop
# Switched to branch 'develop'
$ git merge --no-ff hotfix-1.2.1
# Merge made by recursive.
# (Summary of changes)
The most common mistake is that a bunch of developers DON'T KNOW how to write a proper commit message
Kenjis-MacBook-Pro:website kenji$ git log --pretty=oneline --abbrev-commit
#cd3e27a contact page
#aee9d0d comments
#eac95e5 list of online users, some other changes because of server
#fae5636 little edit
#fae5636 feature now working
#fae5636 i completed the task
Kenjis-MacBook-Pro:website kenji$ git log --pretty=oneline --abbrev-commit
#43ec6aa Fix error when the URL is not reachable
#4fe84ab Add error message if something went wrong
#753aa05 Add server fingerprint check
#df3a662 Fix shadow box closing problem
[TICKET_ID | Optional | N/A] Fix error when protocol is missing
First, it checks if the protocol is set. If not, it changes the url and
add the basic http protocol on the beginning.
Second, it does a "preflight" request and follows all redirects and
returns the last URL. The process then continues with this URL.
Resolves #17
Subject
Body
Bottom Line
[TICKET_ID | Optional | N/A] Fix error when protocol is missing
.
.
.
it very good as a single short (less than 50 character) line summarizing the change, followed by a blank line
"If applied, this commit will (has been)... [commit]" Rule
...
First, it checks if the protocol is set. If not, it changes the url and
add the basic http protocol on the beginning.
Second, it does a "preflight" request and follows all redirects and
returns the last URL. The process then continues with this URL.
Resolves #17
Body
Bottom line
The body should not exceed 72 characters for a line. Of course not every commit has to have body.
This can be a link, number or if you use GitHub you can write it as Resolves #N / Closes #N, where N is the issue ID.
where: ...
[TICKET-ID]: Is your task id. I.E: III-123, Tsk-12, N/A
Verb(past|present): Is the action that you make. I.E: Implemented, Fixed, Updated.
Quick description: Describe your changes. I.E: users list component
$git commit -m "[III-123] Implemented users list component"
Another common mistake is that a bunch of developers don't have a proper git configuration
Kenjis-MacBook-Pro:website kenji$ git log
commit 0e3240cbd4f6501a827255f4cbeb00966a284e2c (HEAD -> bugfix/III-13714, origin/bugfix/III-13714)
Author: Juan Perez <juan.perez@truextend.com>
Date: Thu Aug 15 17:35:12 2019 -0400
[III-13714] Added missing tabindex values
commit 8fdf829efa156ba45fded4cfcc6d7786e62eb3fb (origin/develop_3.2, develop_3.2)
Author: John Perez <elsexymachocaporal@gmail.com>
Date: Wed Aug 14 13:10:14 2019 -0500
Merge pull request #4157 in I3/website from bugfix/III-13709 to develop_3.2
commit 0e3240cbd4f6501a827255f4cbeb00966a284e2c (HEAD -> bugfix/III-13714, origin/bugfix/III-13714)
Author: John Perez <elsexymachocaporal@gmail.com>
Date: Thu Aug 15 17:35:12 2019 -0400
[III-13714] Added missing tabindex values
commit 8fdf829efa156ba45fded4cfcc6d7786e62eb3fb (origin/develop_3.2, develop_3.2)
Author: John Perez <elsexymachocaporal@gmail.com>
Date: Wed Aug 14 13:10:14 2019 -0500
Merge pull request #4157 in I3/website from bugfix/III-13709 to develop_3.2
It's easy to avoid that embarrassing commits
Kenjis-MacBook-Pro:test kenji$ git config user.name "Kenji Lozano"
Kenjis-MacBook-Pro:test kenji$ git config user.email "Kenji@domain.com"
Or... You can edit .git/config manually
Kenjis-MacBook-Pro:test kenji$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
name = Kenji Lozano
email = Kenji@domain.com
$ git help [-a|--all [--[no-]verbose]] [-g|--guide]
[-i|--info|-m|--man|-w|--web] [COMMAND|GUIDE]
Non-competitive, collaborative, fun environment
All skill levels are welcome
Safe to try new ideas
Meeting room with enough seats (typical attendance varies between 5 and 20 ?)
At least one PC or laptop
A digital projector (‘beamer’)
Today's Coding Dojo is a git-based Kata(Challenge), in order to play with Git.
https://nvie.com/posts/a-successful-git-branching-model/ https://sethrobertson.github.io/GitBestPractices/ https://raygun.com/blog/git-workflow/ https://juffalow.com/other/write-good-git-commit-message https://medium.com/@steveamaza/how-to-write-a-proper-git-commit-message-e028865e5791 https://medium.com/quick-code/top-tutorials-to-learn-git-for-beginners-622289ffdfe5 https://www.atlassian.com/git/tutorials/advanced-overview https://github.com/git-tips/tips https://git-scm.com/book/en/v1/Git-Basics-Tips-and-Tricks https://about.gitlab.com/2016/12/08/git-tips-and-tricks/ https://www.algotech.solutions/blog/engineering/git-tips-tricks/
Kenji's experience.....
And...