This Week Reads

Advanced Features with Azure Service Bus

High level overview of advanced features, from Session & FIFO, Auto Forwarding, Scheduling, Deferred, Duplicate detection to high availability and disaster recovery.

Strangler pattern

If you ask me, I think it’s not much of an architecture pattern, but more of migration strategy. Especially useful to migrate from legacy to modern application. It’s worth the read.

10 Important Git Commands that Every Developer Should Know

If you’re new to Git, this is a good start. The 10 important (and also most commonly used) Git commands. If you’re Git veteran, it’s also a good refresher.

Move petabytes of data with resilience – Azure Data Factory adds resume support!

It’s encouraging to learn how far Azure Data Factory has come. It now has support for resuming the pipeline when it fails. The resume will only run from the point where it failed.

How a Kaggle Grandmaster cheated in $25,000 AI contest with hidden code

Cheater is going to get caught eventually. This is an entertaining story to read about cheating in machine learning competition.

Basic Git Command Line on Terminal

Following are some useful command lines for Git operations, running on Mac’s Terminal.

Display Git version.

$ git --version

Initialize Git in a folder. This tells Git that you want to use your the current folder you are in as Git repo

$ git init

Show pending changes (files you have changed and haven’t committed)

$ git status

List all branches

$ git branch

Switch to ‘master’ branch

$ git checkout master

Add remote source named ‘origin’

$ git remote add origin

Download existing branch (‘beta’) from ‘origin’ and save it as ‘beta-test’ branch in local. Local branch can have the same name as the remote branch, this is just to show parameter order.
After fetching from remote, the new branch will NOT have ‘git pull’ tracking configured for that branch. Call ‘branch’ command with ‘–set-upstream-to’ to set tracking information.

git fetch origin beta:beta-test
git checkout beta-test

Set tracking information for local branch called ‘master’ to ‘origin/master’. Must already have the ‘origin/master’ in remote branch.

$ git branch --set-upstream-to=origin/master master

Show remote sources

$ git remote show

Show ‘origin’ info remote source

$ git remote show origin

Look up current configured remote source

$ git remote -v

Pull latest version from ‘origin’ source control after setting remote source

$ git pull origin master

Pull latest version from source control without setting remote source

$ git pull

Add a new file to Git repo

$ git add something.txt

Add all untracked files to Git repo

$ git add .

Remove whole folder and all its content from index (untrack a folder and all its content)

$ git rm foldername -r

Commit to repo with ‘Hello World’ message

$ git commit -m 'Hello World'

Push your commits to the ‘master’ branch of ‘origin’ source to Git

$ git push origin master

Create a local clone of a repository

$ git clone

Fetch from ‘origin’ source

$ git fetch origin

Merge ‘master’ branch of ‘origin’ source to local copy

$ git merge origin/master

Push and track ‘branch1’ to remote ‘origin’. This is for branch that doesn’t yet exist in remote.

$ git push -u origin branch1

Undo (discard) all uncommitted changes.

$ git reset --hard

Undo (discard) all committed (and uncommitted) changes that haven’t been pushed.

$ git reset --hard HEAD~1

To delete a local branch

git branch -d the_local_branch

To remove a remote branch (if you know what you are doing!)

git push origin :the_remote_branch

Create a link (remote) from one repo to another. Git ‘pull’ here is used to download the repo’s branches and tracking information.
See here for more details.

git remote add repo-A-branch <git repository A directory>
git pull repo-A-branch

Cherry pick commit with id 86f4c61 to current branch

$ git cherry-pick 86f4c61

Git Configurations

$ git config

Save git credentials

$ git config credential.helper store
// Can be any command that requires credentials.
$ git push
Username: <type your username>
Password: <type your password>

// Now the credentials are stored and will be used for any command need credentials
$ git push
Level Location Description Command Option
System /etc/gitconfig System level configuration
C:\Program Files\Git
Global .gitconfig
Global level configuration
Local /.git/config Repository level configuration
Local repository folder

Fork vs Clone
Clone doesn’t let you contribute back to the ‘upstream’ repository unless you are explicitly declared as “contributor”. Fork allows you to request a pull from ‘upstream’ repository

Pull vs Fetch
git pull does a git fetch followed by a git merge