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..

Thursday, 24 September 2015

A Short C Programming Guide

So you want to be a coder.... I mean, a programmer, well by reading this guide maybe we will be able to help you accomplish that ultimate goal. First, let us tell you some facts about C and its derivative - C++. C is considered the most commonly used programming language in the world. If you want a job in programming, then you will need to know this language, and know it well. But what really makes C the programming language that every programmer wants to use. Well, C programming has been around for quite some time.

The original C language since the 70s, and the derivative C++ since the early 80s, which is equivalent to the eons in computer time. C language is the most versatile high level language. C language permits just about anything, thus allowing programmers to write straight to the metal. C’s code runs very fast.

This tutorial is meant to be a brief introduction to the C language, it is by no means exhaustive.



1. Your First C Program

If you have ever read another guide or a book on C programming language, then you have probably seen this program before. The hello world. This is a perfect starting place for our guide. So, go ahead and type the following C program into your favorite editor.

/* Hello World */
#include <stdio.h>

void main()
{
    printf("\nHello World\n"); // print to screen
}

Now save this code into a file, and call the file helloworld.c, then compile the file by typing at a command prompt:

gcc helloworld.c

If you are using *Nix, then you should have an -> a.out file now, but if you are going to use Windows you might be now wondering what is gcc, and where you are going to type the above code into. On Windows OS, getting started with C language is little more difficult compared to a *Nix variant.




A C Program contains variables and functions. The functions of a program specify the tasks that are going to be performed by the program. The above C program has one function called the main. The main function tells your C program where to start running. The main functions are normally kept short and calls for different functions to perform the necessary sub-tasks. Every C code must have a main function.

C language is case-sensitive. All the commands have to be written like they are above. C denotes the end of statement with a semi-colon like Pascal & Java. Brackets usually signify either to "{" begin a group of statements, or "}" or end a group of statements. The /* comment */ or // designates a comment. Anything written after two slashes the compiler ignores. The very last part of the program that you should take notice of is the #include. This simply includes a group of functions from the filename specified between then greater than and the less than signs (<...>). The file located above stdio.h contains a list of standard functions for C compiler to use, the function our above program uses is printf. Printf takes the characters between the quotation marks, and outputs them to the screen.

Now you fully nderstand the hello world program.

To Know More about C programming reference sheet visit us

Resource:Click Here

Friday, 4 September 2015

GIT Command Reference

What is GIT?

Gitis a scalable, fast and distributed revision control system with a usually rich command set that provides both high-level operations & full access to internals.

Git stores and deals with the information much differently than these other version control systems, even though the user interface is fairly similar, and understanding those differences will help prevent you from becoming confused while using it.
 The major difference between git and other Version Control System (VCS) is the way Git thinks about its data. Accordingly, some other systems store information as a list of file-based changes. Other systems think of the information they keep as a set of files and the changes made to each file over time.

Git doesn’t think of or store its data this way. Instead, Git thinks of these data more like a set of snapshots of miniature file system. Every time you commit, or save the state of your project in Git accordingly, takes a picture of what all your files look like at that moment and stores a reference to that snapshot. It is efficient, if files have not changed, it does not store the file once again, it just a link to the previous same file it has already stored. Git thinks about its data more like a stream of snapshots.

 This is an important distinction between Git and nearly all other VCSs. It makes the Git considered almost every aspect of version control that most other systems copied from the previous generation. This make Git more like a mini file system with some incredibly powerful tools built on top of it, or rather than VCSs.

Git Has Integrity

Everything in GIT is check-summed before it stored and it is stored and is then referred to by that checksum. That means it’s impossible to change the contents of any file or directory without Git knowing about it. This function is built into Git at the lowest level & is integral to its philosophy. You can’t lose the information in transit or get file corruption with ought Git being able to detect it.

Git Generally Only Adds Data

When you do actions in Git, nearly all of them only add data to the Git database. It is very hard to get the system to do anything that is not undo able or to make it erase data in any way. In VCS, you can lose or mess up changes you haven’t committed yet, but after you get a snapshot into Git, it is very difficult to loose, especially if you regularly push your database to another repository.

Git Advantages

•Git allows users to selectively pull branches from other repositories accordingly. This provides an upfront mechanism for narrowing the amount of history stored locally.
•Git supports an unlimited number of parent revision during a merge
•Git has rebase command and which allows you to take a local branch and change its branch point to more recent revision.

Git Command References

Users interact with GIT through git command lines.  There are GUI like Tortoise Git that runs on top of the GIT command sets.

You can run something like Git log 1a410e to look through your whole history, but you still also have to remember that 10410e is the last commit in order to walk that history to find all those objects. You require a file in which you can store the SHA-1 value under a simple name so you can use the pointer rather than the raw SHA-1 value.

In Git, these are called “references”, you can find the files that contain the SHA-1 values in the, git/refs directory. In the currently project, this directory contains no files, but it contains a simple structure.

To know More Info about C programming reference sheet visit us

Article Source:- Click here


 

C Programming Reference Sheet

C programming sheet provides total description about Programming language. C Programming plays a very important and significant role accordingly.

Why C Programming language as your first Programming Language?

There are so many programming languages are available that are used in the academic and industry. You require being familiar with at least two programming languages to be successful even if your future career is not relating to programming. We believe that today's time it is very important to have the knowledge of basic programming languages. If you want to become a programmer than you should learn C first, then pick up a language that is being suited for your need.

The World of programming Languages is vast. Programming Languages that are tried and often dominate the landscape, with contenders stepping into the arena every so often, However, due to the nature of software development, it can be hard for new programming languages to gain attention. You generally need strong understanding and strong reason to switch from a language you are currently using.

It requires long time to learn and to practice and learn new languages, and you have to be confident that the languages you are considering switching to will be supported in the long term. According to today's market no body want to build a software in a language that will be obsolete in few year's time. C Programming Reference Sheet provides total description of C Programming Language. The C programming language is widely used and most popular programming language for creating computer programs. Programs around globe embrace C because it gives maximum control & efficiency to the programmer.

If you are C Programmer there are couples of Benefits you gain from learning C.

• You will be able to write and read the code for a large number of platforms- everything from microcontrollers to the most advanced scientific Systems can be written in C, and many modern operating systems are developed using C.

• Then you can jump easily to the object oriented C++ languages becomes much more simple. C++ is considering as extension of C language.

• It is difficult to learn C++ without learning C first.

To Know More about Fedora 20 commands visit us