Kategorien
Allgemein Git - Github

Basic Git Commands

BASIC COMMANDS

$ git init // Initialize a local Git Repo
$ git add // Add file(s) to index (to the staging area)
$ git status // Check status of working tree will display diffs between working tree and staging area
$ git add *.html // will add all html files to the staging area
$ gitt add . // adss everything to the staging area
$ git commit // Commit changes to index (Puts everything in to the local repo)
$ git touch .ignore // Creates a Git ignore file
$ git commit -m ‘message’ // Commits with message includedgit commit -m
$ git rm –cached // Unstage or delete from staging area
$ clear // Clears the screen

Working with Github
$ git push // Push to rem Repo (credentials or SSH keys required)
$ git pull // Pull latest from rem Repo
$ git clone // Clones a rem Repo to your machine
$ git branch mybranch // Creates a branch named mybranch

$ git config –global // configure git globally $ git config –global user.name ‘Username’