Giter Club home page Giter Club logo

git-commands's Introduction

git-commands

#Introduce yourself to git. git config --global user.name "examplename" git config --global user.mail "example@mail"

#To use the different username and password for a particular project. #change it inside the project #change the directory to particular directory.folling commands git config user.name "examplename"(without global) git config user.mail "example@mail"(without global)

git clone "repo_url"(to clone the remote repo to local workspace)

git log (it will tell you total commits information like how many commites done,commitid,commited by whom,commit information etc..)

git add "" / git add . (adding the files/code/changes to the staging area from local workspace/working area)

git commit -m"commit msg" (to add the changes from staging area to remote directory we need to commit the changes with a commit message)

git push origin (pushing the changes from local repo to remote repo by branchname ex: git push origin master)

git pull repo_url (it will pull all the new files or changed files from central repo and it directly places or connects them into your master branch)

#FOR GIT PUSH: git remote add origin url git remote -v git push origin master

#To make changes in github master branch:- git pull origin master make changes in master branch git add filename git commit -m"commit msg" git push origin master

#To make changes in github develop branch:- git pull origin develop make changes in develop branch git add filename git commit -m"commit msg" git push origin develop git fetch repo_url (it does also the same thing but it actually store in a different branch which is not connect with your workflow.so if you are doing git fetch make sure that you do a git merge .so that you actually can see the changes in your local repo) git pull = git fetch + merge

GIT PULL REQUEST:- Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.

git reset git revert girt rebase

git checkout :to know in which branch you are working git checkout branch name: to swith to a particular branch git checkout -b branchname: it will create branch and switch to the branch git stashing git cherrypick git working area/local repo git index/git staging area git branch git merge git commit git log git add git pull git push git clone git add git configuration

git-commands's People

Contributors

gowthamvishnu avatar

Watchers

 avatar

Forkers

2000032059

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.