Giter VIP home page Giter VIP logo

githubcommands's Introduction

Useful Github Commands for development.

  • Git is a distributed version-control system for tracking changes in source code during software development.
  • It is designed for coordinating work among programmers, but it can be used to track changes in any set of files.

Commands

  • git config => sets the author name and email address respectively to be used with your commits

    $ git config –global user.name “<name>”
    $ git config –global user.email “<email-address>
  • git init => turns a directory into an empty Git repository

    $ git init
  • git add => Adds files in the to the staging area for git There are different ways to use git add

    • To add a single file
    $ git add <file>
    • To add everything at once
    $ git add -A / git add .
  • git commit => is like setting a checkpoint in the development process with a short message to explain what you have developed or changed in the source code

    $ git commit -m "message"

    [ git commit saves your changes only locally ]

  • git remote add => connects your local repository to the remote server

    $ git remote add <variable name> <remote server link>
  • git push => sends the committed changes to your remote repository

    $ git push <remote> <branch-name>

    [ git push only uploads changes that are committed ]

  • git pull => fetches and merges changes on the remote server to your working directory

    $ git pull <repository-link>
  • git status => lists all the files that have to be committed

    $ git status
  • git diff => shows the file differences which are not yet staged

    $ git diff
  • git checkout => mostly used for switching from one branch to another. We can also use it for checking out files and commits

    $ git checkout <name-of-your-branch>
    • To create and switch to a branch at the same time
    $ git checkout -b <name-of-your-branch>

    [ -b stands for branch ]

  • git log => lists the version history for the current branch

    $ git log
    • for detailed changes
    $ git log --summary

Reference Links

if you want to contribute to the project,create a pull request

githubcommands's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.