Coder Social home page Coder Social logo

github-commands's Introduction

GitHub Commands

Git setup

  • git config --global user.name “[firstname lastname]”
  • git config --global user.email “[valid-email]”

Create a new local repository

  • git init

Checkout a repository

  • git clone /ssh part

Add files

  • git add .
  • git add

commit changes to head (not to remoute repo)

  • git commit -m "massage"

Commit any file that you have added with git

  • git commit -a

Send changes to the master(main) branch of your remote repo

  • git push origin master(main)

To connect local repo to a remote server

  • git remote add origin

List all the repo

  • git remote -v

Create a new branch

  • git checkout -b

List all the branches in repo (and the current branch)

  • git branch

Delete the branch

  • git branch -d

Push the branch to remote repo

  • git push origin

Switch from one branch to another

  • git checkout

Push all the branches to remote repo

  • git push --all origin

Fetch and merge changes on the remote server

  • git pull

Merge a branch

  • git merge

Check a status of repo/ code (if there any changes)

  • git status

Help with commands

  • git help
  • git -a

History of changes

  • git log

github-commands's People

Contributors

statuja avatar

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.