Wednesday, 7 February 2018

Basic Git Commands for begginers



NAME

git-init - Create an empty Git repository or reinitialize an existing one

SYNOPSIS

git init [-q | --quiet] [--bare] [--template=<template_directory>]
   [--separate-git-dir <git dir>]
   [--shared[=<permissions>]] [directory]

Ref : git init



NAME

git-clone - Clone a repository into a new directory

SYNOPSIS

git clone [--template=<template_directory>]
   [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
   [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
   [--dissociate] [--separate-git-dir <git dir>]
   [--depth <depth>] [--[no-]single-branch] [--no-tags]
   [--recurse-submodules[=<pathspec>]] [--[no-]shallow-submodules]
   [--jobs <n>] [--] <repository> [<directory>]

Ref : git clone



NAME

git-add - Add file contents to the index

SYNOPSIS

git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p]
   [--edit | -e] [--[no-]all | --[no-]ignore-removal | [--update | -u]]
   [--intent-to-add | -N] [--refresh] [--ignore-errors] [--ignore-missing] [--renormalize]
   [--chmod=(+|-)x] [--] [<pathspec>…​]

Ref : git add

NAME

git-commit - Record changes to the repository

SYNOPSIS

git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
    [--dry-run] [(-c | -C | --fixup | --squash) <commit>]
    [-F <file> | -m <msg>] [--reset-author] [--allow-empty]
    [--allow-empty-message] [--no-verify] [-e] [--author=<author>]
    [--date=<date>] [--cleanup=<mode>] [--[no-]status]
    [-i | -o] [-S[<keyid>]] [--] [<file>…​]

Ref : git commit

NAME

git-stash - Stash the changes in a dirty working directory away

SYNOPSIS

git stash list [<options>]
git stash show [<stash>]
git stash drop [-q|--quiet] [<stash>]
git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
git stash branch <branchname> [<stash>]
git stash [push [-p|--patch] [-k|--[no-]keep-index] [-q|--quiet]
      [-u|--include-untracked] [-a|--all] [-m|--message <message>]]
      [--] [<pathspec>…​]]
git stash clear
git stash create [<message>]
git stash store [-m|--message <message>] [-q|--quiet] <commit>

Ref : git stash

NAME

git-push - Update remote refs along with associated objects

SYNOPSIS

git push [--all | --mirror | --tags] [--follow-tags] [--atomic] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
    [--repo=<repository>] [-f | --force] [-d | --delete] [--prune] [-v | --verbose]
    [-u | --set-upstream] [--push-option=<string>]
    [--[no-]signed|--signed=(true|false|if-asked)]
    [--force-with-lease[=<refname>[:<expect>]]]
    [--no-verify] [<repository> [<refspec>…​]]

Ref : git push

NAME

git-pull - Fetch from and integrate with another repository or a local branch

SYNOPSIS

git pull [options] [<repository> [<refspec>…​]]

Ref : git pull