Skip to content

Instantly share code, notes, and snippets.

View giripilgaonkar's full-sized avatar

Giri Pilgaonkar giripilgaonkar

View GitHub Profile
@giripilgaonkar
giripilgaonkar / Vagrant commands
Last active August 1, 2017 20:55
Vagrant commands
Creating the Vagrantfile
vagrant init
Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
vagrant init boxpath
Initialize Vagrant with a specific box. To find a box, go shopping. When you find one you like, just replace it's name with boxpath. For example, vagrant init chef/centos-6.5.
Vagrantfile customizations
vagrant.configure("2") do |config|
config.vm.box = "chef/centos-6.5"
# guest is the VM; host is your computer end
config.vm.network "forwarded_port", guest: 80, host: 8080
@giripilgaonkar
giripilgaonkar / git-gitflow-commands
Last active July 17, 2017 17:58
git gitflow commands
# Show status of current changes
git status
# Revert a single file to the last commit
git checkout <filename>
# Checkout pull request from GitHub
git fetch origin pull/<id>/head:<local-branchname-for-pr>
git checkout <local-branchname-for-pr>