Git Product home page Git Product logo

initialgitrepository's Introduction

โ‰ # Command Line Definitions

cd - change directory/folder

ls - list directory contents/shows everything inside current folder

ls -a - shows visible and hidden files/directories

man - displays manual for given command

mkdir - make directory with given name (folder)

pwd - print working directory/shows you where you currently are

touch - create file with given name

cd .. - move up one directory

cd ~ - home

Git Definitions

git init - initialize an empty repository/makes a directory a repository by putting a .git folder into it

git add - moves a modified file to the staging area

git commit -m "<message" -moves staged files to the Git Directory and labels the commit with a message for other developers

git config --global user.name - changes or sets your global username

git config --global user.email - change or set global email address

git config --global --list - displays your global settings

git config --global core.editor - set your global editor

git commit --amend -m "" - changes the commit message of the last commit to the new message

git commit --amend - if you forgot to add a file or you have a misspelling in your commit message.

Overwrites the previous commit with new files and message.

git reset HEAD - moves the staged file from the Staging Area to the Working Directory

git checkout -- - removes any changes made to the file and reverts it's status back to unmodified

git branch - create a new branch with the given name

git checkout - switch to a new branch

git checkout -b - create new branch and switch to it

git branch -d - delete existing branch with given name

git branch - shows all current branches and what branch you're currently on

git merge - merges the histories of two branches into a single branch

Merge Steps

  1. checkout the branch you want to merge changes into.
  2. git merge branch you want to merge into current branch

initialgitrepository's People

Contributors

laurynipsum avatar

Watchers

James Cloos avatar  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.