1. List outdated packages:
$ npm outdated
2. Uninstall a package and update package.json:
$ npm uninstall --save <package>
3. Update a package and update package.json:
$ npm update --save <package>
4. Install latest version of a package:
$ npm install --save <package>@latest
5. List all outdated packages:
$ npm outdated --depth=0
6. List all packages:
$ npm list --depth=0
7. List all global packages:
$ npm list -g --depth=0
You have to crate this file in your $HOME:
$ touch .hgrc
Add configuration to connect mercurial and bitbucket:
[ui]
username = Canek García <canek.garcia@ccud.unam.mx>
[auth]
bitbucket.prefix = https://bitbucket.org
bitbucket.username = canek_garcia
bitbucket.password = *****
Named branches allow assigning persistent symbolic names to branches of development inside a single repository.
Steps:
1. You have to change to 'tests' branch:
$ hg update tests
2. Merge from 'default' branch to 'test' branch:
$ hg merge default
3. Commit changes:
$ hg commit -m "merged default branch for tests"
3.1 Optional, add a tag to branch:
$ hg tag <name_tag>
4. Push changes:
$ hg push
5. Tip, before merging changes, you can also preview them by using:
$ hg diff -r <source_branch>:<target_branch>
References:
The command hg graft uses Mercurial's merge logic to copy individual changes from other branches without merging branches in the history graph.
Recipe:
1. Stay in destination branch:
$ hg up tests
2. Indicate the commit that we want to copy on active branch:
1085 is the revision number that we wanto to copy on active branch:
$ hg graft 1085
with -D parammeter, we indicate a range of commits that we want to copy on active branch:
$ hg graft -D "1086::1088"
Syntax:
$ hg graft [OPTION]... [-r REV]... REV...
3. You don't need to commit changes, but you have to push changes (if you want share your changes on remote server):
$ hg push
References:
Option A:
$ hg revert -r REV
Where REV is the number of revision
Option B:
$ hg up REV
Option C (cloning specific revision):
$ hg clone -r REV
example:
$ hg clone -r 77182fb7451f
References:
Create a new feature branch in the repository:
$ hg branch <feature_branch>
List of branches:
$ hg branches
Switch betwen branches:
$ hg update <name_branch>
$ hg up <name_branch>
Push the feature branch back to Bitbucket:
$ hg push --<feature_branch>
Current branch:
$ hg branch
Close a current branch:
$ hg commit -m 'close feature_branch' --close-branch
$ hg push -b <branch>
References:
Get lastest commit from repository:
$ hg tip
Getting lastest 8 commits from repository:
$ hg log -l 8
Getting lastest 8 commits from 'tests' branch:
$ hg log -l 8 -b tests
Getting lastest 8 commits from 'default' branch with output as a graph representing:
$ hg log -l 8 -b default -G
To see only the commits of a certain user:
$ hg log -u <user_name>
Getting current hash REV:
$ hg id -i
Clone a specific branch:
$ hg clone <source> -b <branch_name>
Clone into a specific directory:
$ hg clone <source> <directory_name>
Clone a specific branch into a specific directory:
$ hg clone <source> -b <branch_name> <directory_path>
$ sudo apt install curl
$ curl -L https://get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ rvm requirements
$ rvm install 2.0.0
$ rvm use 2.0.0 --default
$ rvm rubygems current
$ gem install rails
$ rm -rf ~/.config/google-chrome