The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Github… a bit abstract but I’d like to jump in.

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #45944

    I’m a total n00b to Github. Just set an account up yesterday. I have no idea what a commit or a fork is. I haven’t even installed anything on my comp.

    Can someone tell me where I should start with all this?


    If you’re on a Mac, I *absolutely* love Tower:

    Git is a bit difficult to wrap your head around at first, but it’s a fantastic workflow once you get used to it.


    @Joe_Temp, if you run linux, I can’t imagine that git (command line) would fluster you. Get a cheat sheet and jump in.

    Create a repo for your project on github.

    Then, open a terminal on your computer:

    # make a directory for your project. go there.
    # (or, if you already have a project dir, just go there)
    $ mkdir ~/my_project
    $ cd ~/my_project

    # create a repo.
    $ git init

    # create some files for your project. add them.
    # (or, if the files already exist, just add them)
    $ git add {filename}
    # if you have a lot of existing files,
    # you can add them all at once like
    $ git add ./

    # “commit” is like making a “save point” for your repo.
    # -a means “all”
    # normally, you’ll want to commit changes individually
    # (so you can selectively keep/rollback if you need to)
    # -m means “message”. every commit needs a message.
    $ git commit -a -m ‘first commit’

    # set up git to work with your repo on github
    # {remote_name} is any “name” you like
    # {your_username} is your github username
    # {remote_name} is your github repo name
    # (this is basically the same URL you use to view the repo,
    # but with .git on the end.)
    $ git remote add {remote_name} {{your_username}/{repo_name}.git}

    # push your local work to your repo on github
    $ git push master


    @traq covered the basics that will be enough to get you started. When you init the repo Git ignore file will be created as well. You will want to add paths that you don’t want to track.


    It’s likely that you will have one or more files in your _local_ repo that you don’t really need to have (or, really need to _not_ have) in your github repo. Good examples are local DB credentials, debugging functions or configs, localhost .htaccess files, and so forth.

    You put those file names/paths into your .gitignore file, and (you guessed it) git will ignore them.


    . . .


    Chris Coyier
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.