Giter Site home page Giter Site logo

git-cheat-sheet's Introduction

Terminal Commands

  • pwd - show's your present working directory(where you are in your file tree)

  • ls - lists available scripts(where you can navigate to in your file tree)

  • cd - changes directory to one you select

  • mkdir - creates a directory(folder)

  • touch - creates a file

  • rm filename - removes a file

  • rm -rf foldername - removes a folder and everything in it. Be VERY sure of what is being deleted before running this command

Git

Git is the version control tools that we can use in our command line to interact with our Github.

Git Clone

First you need to copy the url for the github repo that you wish to clone down to your local machine then navigate to the directory that you want to clone the repo into. Once you are in the correct directory run:

git clone "url for github repo"

Git Init

git init is the command that will initialize your project to be tracked by git.

Git Status

git status is the command you can run to check what stage of the process you are on to push your code to github.

run:

git status

Git Add

git add . is the command you can run to start the process of pushing your code to github. git add . will stage all files that have any changes being tracked.

run:

git add .

Git Commit

After staging your code using git add . we now need to commit our changes. This is the final step we will take before pushing our code to github. Think about commits as check points or save points in your code. You will need to provide a message about the commit using the -m flag.

run:

git commit -m 'message about your changes'

Git Push

After staging and commiting your code, it is now ready to be pushed up to github. When your code is ready to be pushed, run:

git push origin master

git-cheat-sheet's People

Contributors

mattcbodily avatar taytestokes avatar

Watchers

James Cloos avatar

Forkers

wlh17 jlynnt

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.