Showing posts with label groovy language reference. Show all posts
Showing posts with label groovy language reference. Show all posts

Tuesday, 6 October 2015

Groovy Commands Reference

The groovy shell has a quite number of different commands, which provide rich access to the groovy shell’s environment.

Commands all have a shortcut (which is something like \h) and a name . The commands may also have some predefined system aliases. The users may also create their own aliases.



1.4.1. Recognized Commands

help

To display the list of commands or the help text for specific command.

The Groovy Command List

groovy:000> : i.e help

The Available commands:

 :help      (:h ) Will display this help message
  ?          (:? ) An alias to: ->help
  :exit      (:x ) Exiting the shell
  :quit      (:q ) An alias to: :exit
  import     (:i ) Importing a class into the namespace
  :display   (:d ) To display the current buffer
  :clear     (:c ) Clearing the buffer and resetting the prompt counter.
  :show      (:S ) Show’s variables, imports or classes
  :inspect   (:n ) Inspecting a variable or the last result with the GUI object browser
  :purge     (:p ) Purging variables, classes, imports or preferences
  :edit      (:e ) Editing the current buffer
  :load      (:l ) Loading a file or URL into the buffer
  .          (:. ) An alias to: ->load
  :save      (:s ) Saving the current buffer to a file
  :record    (:r ) Recording the current session to a file
  :history   (:H ) Displaying, managing and recalling edit-line history
  :alias     (:a ) Create an alias
  :set       (:= ) List or set preferences
  :register  (:rc) Registering a new command with the shell
  :doc       (:D ) This Opens a browser window displaying the specific doc for the argument

For help on a specific command just type:

    :help <command>

Help for a Command

While in the interactive groovy shell, you can ask for help for a specific command to get more details about it's function or syntax.

To Know More About Groovy language Reference Visit us..




Tuesday, 29 September 2015

GIT COMMANDS REFERENCE




A list of some basic Git commands that will get you going with Git.


Git task
Notes
Git commands
Telling Git who you are
Make sure you configure the author name and email address to be used with your commits.
Take Note that Git strips some characters (for example trailing periods) from user.name.
git config --global user.name "Ian Smonerl"
git config --global user.email ian@example.com
Creating a new local repository

git init
Checking out a repository
Create a working copy of the local repository:
git clone / path/to/repository
For a remote server, just use:
git clone username@host:/path/to/repository
Adding files
Adding one or a couple of files to staging (index):
git add <filename>

git add *
Committing
Commit changes to head :
git commit -m "The Commit message"
Committing any files that you've added with git add, and also commit any files you've changed since then:
git commit -a
Push
Send the changes to the master branch of your remote repository:
git push origin master
Status
Listing the files you have changed and those you still need to commit or add.
git status
Connecting to a remote repository
If you have not connected your local repository to the remote server, add the server so as to be able to push to it:
git remote add origin <server>
List all the currently configured remote repositories:
git remote -v
Branches
Creating a new branch and switch to it:
git checkout -b <branchname>
Switch from one branch to another:
git checkout <branchname>
Listing all the branches in your repository, and also tell you what branch you are currently in:
git branch
Deleting the feature branch:
git branch -d <branchname>
Pushing the branch to the remote repository, so other people can use it:
git push origin <branchname>
Pushing all branches to your remote repository:
git push --all origin
Deleting a branch on your remote repository:
git push origin :<branchname>
Update from your remote repository
Fetching and merging changes on the remote server to your working directory:
git pull
To merge different branches into your active branch:
git merge <branchname>
Viewing all the merge conflicts:
Viewing the conflicts against the base file:
Previewing changes, before merging:
git diff
git diff --base <filename>
git diff <sourcebranch> <targetbranch>
After you have manually resolved any kind of conflicts, you mark the changed file:
git add <filename>
Tags
You can use tagging to mark a significant changeset, e.g a release:
git tag 1.0.0 <commitID>
Commit Id is the leading characters of the changeset ID, up to 10, but they must be unique. Get the ID using:
git log
Pushing all tags to remote repository:
git push --tags origin
Undoing local changes
In case you end up messing up, you can replace the changes in your work tree with the last content in head:
Changes already added to the indexing, as well as new files, that will be kept.
git checkout -- <filename>
Instead, so as to drop all your local changes and commits, fetching the latest history from the server and point your local master branch at it, do this:
git fetch origin

git reset --hard origin/master
Search
Searching the working directory for foo():
git grep "foo()"

To Know more About This Content Git Command Reference Visit us..