Nasrul Hazim Bin Mohamad

7 Essential Sublime Text Plugins

Dec
08

Asssalamualaikum,

screen-shot-2016-12-08-at-12-26-58-pm

I’ve been using Sublime Text, quiet sometimes for web applications development. Below are the list of packages installed on my Sublime Text:

  1. SideBarEnhancements – Add more context menu on right click to file or folders
  2. phpfmt – Use for Auto Format to PSR-2
  3. Material Theme – Better UI
  4. Emmet – HTML Helpers
  5. Git – Git Commands
  6. GitGutter – Display changes icon beside line numbers
  7. Markdown Extended

And following are my Sublime Text settings:

{
	"bold_folder_labels": true,
	"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
	"font_size": 23,
	"format_on_save": true,
	"highlight_line": true,
	"ignored_packages":
	[
		"Vintage"
	],
	"line_padding_bottom": 10,
	"line_padding_top": 10,
	"php_bin": "/replace/with/path/to/your/php/bin",
	"show_panel_on_build": true,
	"theme": "Material-Theme.sublime-theme",
	"use_simple_full_screen": true
}

Software Development with Git

Aug
23

Number of practices that i’ve been doing from time to time. All theses are the basic user cases based on doing personal project.

I will add more about working in team with Git.

It’s a bit confusing at the beginning. You just need practices to master the flow of software development with Git.

Git: Undo

May
13

Here are some undo commands, depending on situation.

# To go back to staging from commit
git reset --soft HEAD~

# Unstaging
git reset HEAD <file>

# Undo Changes Made to the File
git checkout -- <file>

Git: How to Sync Fork with Master

May
13

You have forked numbers of repositories, but have no idea how to merge with the master copy if there’s changes. So here the solution.

# Add Upstream Remote
git remote add upstream [URL]

# Fetch Upstream
git fetch upstream

# Checkout master (your fork repo & in case you're not in master branch yet)
git checkout master

# Merge
git merge upstream/master

# Push to Fork
git push origin master

Training: Git 101

Mar
14

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Registration Form: http://goo.gl/forms/7ke6iZH2Zd

Date: 19th March 2016

Time: 9:00 AM – 4:00 PM

Location: http://bit.ly/cc-training-location

Fees: RM 20

Course Outline:

Introduction to Version Control System (VCS)

GIt Installation
– Config

GIt Basics
– Initialization
– Cloning
– Check File Status
– Commit
– Add
– Ignore files
– Undo Changes
– Unmodify Modified FIles
– Remote
– Tagging

GitHub

 

Git: Common Tagging Commands

Jan
21

Below are the common tagging commands that usually use based scenario event – accidentally name wrong tag, need to retagging or probably want some commit available at particular tag..retagging required.

# display all tags available
git tag

# add local tag
git tag youTagName

# remove local tag
git tag -d yourTagName

# push all local tags to remote
git push origin --tags

# push specific tag to remote
git push origin :refs/tags/yourTagName

Git: Rename Tag

Sep
03

Git, rename your tag.

git tag new old
git tag -d old
git push origin :refs/tags/old
git push --tags

Reference: How do you rename a Git tag?

Git: Rename a Branch

Apr
27
git branch -m old_branch_name new_branch_name #Rename branch locally
git push origin :development #Delete the old branch
git push --set-upstream origin new_branch_name #Push the new branch, set local branch to track the new remote

git-rename-branch
Reference: https://gist.github.com/lttlrck/9628955