Giter Club home page Giter Club logo

git_commands's Introduction

Github infrastructure setup

Local repository setup

Initialisation of git in the local development or deployment copy:
git init

it will create .git/ subfolder with version data base

ading content to the git git add .

check status git status : prints status of the local git, changed files , neww files etc.

after changing filess : git add ., git commit -m "commit message"

special file .gitignore containing list of ignored files and directories one per line. Filess listed in .gitignore will not be aded to git with git add .

Also for first time use on machine you need to st up your user

git config --global user.email "[email protected]"

git config --global user.name "Your Name"


Setting remote repository in GitHub

Create new repository in GitHub setting up ssh keypair authentification is comfortable option to work on linux machines commandprompt

to generate keypair on your linux machine generaite caypair:

ssh-keygen -t ed25519 -C "[email protected]"

then on github on your repository settings chose

Deploy keys

and add new key.

on linux machine enter command cat ~/.ssh/'your key name'.pub

and copy all file content to the github key, and name it

first time conecting to the repository from your local git server will exchange keys and will ask you to trust it.


Linking local git to GitHub

on the local git repositori create link to remote git

git remote add origin 'repository url'

'origin' is name of remote repository it can be any name, but the common, agreed-upon convention is to call a repository's main remote connection "origin"


Other misc commands.

You can include the branch to track when setting up remotes, to keep things working as you might expect:

git remote add --track master origin [email protected]:group/project.git # git

git remote add --track master origin [email protected]:group/project.git # git w/IP

git remote add --track master origin http://github.com/group/project.git # http

git remote add --track master origin http://172.16.1.100/group/project.git # http w/IP

git remote add --track master origin /Volumes/Git/group/project/ # local

git remote add --track master origin G:/group/project/ # local, Win

git_commands's People

Contributors

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