Git Product home page Git Product logo

c's Introduction

setup git repository for storing 'c' source code.
--------------------------------------------------

Main repository is stored on GitHub server: github.com

ssh passwd: 
github login: [email protected]
github passwd: 

setup git:
------------
Global setup:

  git config --global user.name "Jason Angus"
  git config --global user.email [email protected]
  git config --global color.ui true

Next steps:

mkdir ~/swdev
cd ~/swdev

Best to login to github first and check out help section there for clear instructions.

Follow setting up ssh key instructions first: http://help.github.com/linux-set-up-git/

change to ~/swdev on local computer.

git clone [email protected]:j-angus/c.git

creates directory: ~/swdev/c

change to ~/swdev/c

This is the directory for all c development.

Do some work.

add files to be tracked:

$ git add <path to files>

# Let's only store *.c source files and other informational text files. No compiled or object files for now.

save and commit changes to local git repository.

$ git commit

will commit all files added in the last step.

Or we can add and commit previously added files with:
$ git commit -am "commit comment"

push and merge changes to remote, github, repository.


to update on github:

$ git push -u origin master


After we're all setup locally and we want to get the latest revisions from github:
-----------------------------------------------------------------------------------

check to see if we are up to date or not:

$ git remote show origin

get changes from remote but don't merge:
$ git fetch
look at the differences after a fetch:
$ git diff
$ git show

if we're happy with changes, we can merge this way:
$ git merge origin/master

we can fetch and merge in one step with:
$ git pull origin

or even:
$ git pull

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.