Coder Social home page Coder Social logo

hello-world's Introduction

Quick Start

Check version

git --version

Set user

git config --global user.name "Fatih Keles"
git config --global user.email "[email protected]"

check user

git config --global user.name
git config --global user.email

Proxy

Thanks to: https://gist.github.com/evantoli/f8c23a37eb3558ab8765 In the following form git config --global http.proxy http://proxyuser:[email protected]:8080

git config --global http.proxy http://www-proxy-lon.uk.oracle.com:80
git config --global https.proxy http://www-proxy-ams.nl.oracle.com:80

unset

git config --global --unset http.proxy

check

git config --global --get http.proxy

Create a local repository

cd C:\GIT
mkdir hello-world
cd hello-world
git init
git status

Add files

git add readme.md
git commit -m "Created readme"

Check modifications

git diff

Set Remote Repository

git config --global user.username "fatih-keles"
git config --global user.username

Add remote connections

git remote add <REMOTENAME> <URL>

Set a URL to a remote

git remote set-url <REMOTENAME> <URL>

Pull in changes

git pull <REMOTENAME> <BRANCHNAME>

View remote addresses

git remote -v

Push changes

git push <REMOTENAME> <BRANCH>

Set remote

git remote add origin https://github.com/fatih-keles/hello-world.git
git remote set-url origin https://github.com/fatih-keles/hello-world.git

Push remote

git push origin master

Clone remote

git clone https://github.com/fatih-keles/patchwork.git
cd patchwork
git remote -v

http://fatih-keles.github.io/patchwork

Also Connect to the Original Repository

You can name this remote connection anything you want, but typically people use the name 'upstream'

git remote add upstream https://github.com/jlord/patchwork.git

create a branch

git branch <BRANCHNAME>
git branch add-fatih-keles

git checkout <BRANCHNAME>
git checkout add-fatih-keles
git status 

commit and push to remote

git commit -m "add fatih-keles"
git push origin add-fatih-keles```

### You can create and switch to a branch in one line
```git checkout -b <BRANCHNAME>```
### Create a new branch
```git branch <BRANCHNAME>```
### Move onto a branch
```git checkout <BRANCHNAME>```
### List the branches
```git branch```
### Rename a branch you're currently on
```git branch -m <NEWBRANCHNAME>```
### Verify what branch you're working on
```git status```

### See changes to the remote before you pull in
git fetch --dry-run

### GIT pull
```git pull origin add-fatih-keles```

### clean up

git checkout gh-pages git merge add-fatih-keles git branch -d add-fatih-keles git push --delete git push origin --delete add-fatih-keles git pull upstream gh-pages



### Merge a branch into current branch
```git merge <BRANCHNAME>```
### Change the branch you're working on
```git checkout <BRANCHNAME>```
### Delete a local branch
```git branch -d <BRANCHNAME>```
### Delete a remote branch
```git push <REMOTENAME> --delete <BRANCHNAME>```
### Pull from a remote branch
```git pull <REMOTENAME> <BRANCHNAME>```

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.