Giter Site home page Giter Site logo

gitbasiccommands's Introduction

gitBasicCommands

Centralized version Control System

Distributed Version Control System

  1. have git installed in your laptop
  2. create a folder and create the necessary java files(created a java project - UtilityProject using eclipse) - this acts as the working directory
  3. move into the java project folder (UtilityProject)
  4. create git local repository
    • open git bash here
    • run the command - git init
    • this command will create a .git hidden folder inside UtilityProject folder
  5. move the files from working directory to the staging area
    • run the command - git add .
  6. move files from staging area to local repository
    • run the command - git commit -m "initial commit"
  7. next we create a remote repository(UtilityRepository) in out github account
  8. come back to the bit bash and set the remote url
  9. push the code from local repository to the remote repository
    • run the command - git push -u origin master

Rewriting the steps if you don't have eclipse

  1. have git installed in your laptop
  2. create a folder(DemoFolder) and create a file sample.doc in it , DemoFolder acts as the working directory
  3. move into the folder (DemoFolder)
  4. create git local repository
    • open git bash here
    • run the command - git init
    • this command will create a .git hidden folder inside DemoFolder folder
  5. move the files from working directory to the staging area
    • run the command - git add .
  6. move files from staging area to local repository
    • run the command - git commit -m "initial commit"
  7. next we create a remote repository (DemoRepository) in our github account
  8. come back to the bit bash and set the remote url
  9. push the code from local repository to the remote repository
    • run the command - git push -u origin master

git status

git config --list git config --global user.name "TeamLeadDemo" git config --global user.email "[email protected]" git config --list

git branch git branch -a git branch requirement1 git checkout requirement1 git branch git push --set-upstream origin requirement1

github pull request github issues

gitbasiccommands's People

Contributors

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