Showing posts with label git. Show all posts
Showing posts with label git. Show all posts
Thursday, December 16, 2021
Thursday, December 7, 2017
Chasing the Trunk Based Development
A source-control branching model, where developers collaborate on code in a single branch called trunk, resist any pressure to create other long-lived development branches by employing documented techniques. They therefore avoid merge hell, do not break the build, and live happily ever after..
Release branch is typically a snapshot from trunk with an optional number of cherry picks that are developed on trunk and then pulled into the branch.
Monday, February 27, 2017
Git tips & tricks: Merge vs Rebase (When to use?)
Keeping a clean history and smooth git workflow comes down to knowing the base use-cases & rules.
Rebases are how changes should pass from the top of hierarchy downwards and merges are how they flow back upwards.
- Use
git pull --rebasewhen pulling changes from origin. - Use
git mergewhen merging feature branch changes back to master.
Rebasing Deletes Merge Commits! Never rebase master onto your feature branch!
see also
Using
see also
–preserve-merges flag.
Using
merge when pulling changes from origin ties two histories together creating interleaved messy thread of histories:- Interleaved history during
merge: their feature X, my feature Y, their feature X, my feature Y... - Linear history during
rebase: their feature X, their feature X, my feature Y, my feature Y...

Tuesday, January 12, 2016
Friday, October 23, 2015
Git Tips & Tricks: Make the current commit the only (initial) commit
Here is the brute-force approach, which also removes the configuration of the repository.
Thursday, September 24, 2015
Wednesday, April 9, 2014
Git Tracking remote branches
Why i need to track some remote branch?
First af all, It's nessesary for git system to know where to push/pull the changes from your local branch. Whatever, u can explicity define where u want to push your changes via using the $ git push <remote-name> <branch-name>. But let's ssume that u're a bit lazy and won't to type your remote branch name extra times when u're working in the same branch all the time. So Let's try it:
Friday, January 10, 2014
Git tips & trics
Skipping the staging Area
use $ git commit -a -m 'added some ASDoc comment' to stage every already tracked file automatically before doing commit and make commit with the comment and with skip git add part.
Stage all files at once
To stage all files from current folder at once use $ git add .
Using "." it's the shortnes way to add the current folder and all subfolders of it.
But don't forget to do git status before it, to prevent adding of some unexpected files!
Using "." it's the shortnes way to add the current folder and all subfolders of it.
But don't forget to do git status before it, to prevent adding of some unexpected files!
How to quit from Vim without the window closing :)
When u called $ git commit without -t , the Vim will be opened by default to add comment message to your commit.
So, enter the comment message, press Esc tnen :wq to write comment, quit from Vim and finish the commit or Esc then :q to just quit.
So, enter the comment message, press Esc tnen :wq to write comment, quit from Vim and finish the commit or Esc then :q to just quit.
How to output content of the file into console.
Use $ cat some_file , to fully output file content into console.
Subscribe to:
Posts (Atom)
