Thread: How to use github?

  1. #1
    Registered User
    Join Date
    Sep 2015
    Posts
    14

    How to use github?

    i opened an account there but i have no idea how to use it. Do you copy your codes and paste them there? or there is a way to upload your project so that others can use it and see how it works if you upload files of your project which one do you upload? the one with codes only? or the whole folder? i am learning c now but i don't know how to put my projects on github. help me out. thank you

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,784
    Quote Originally Posted by endrick
    i opened an account there but i have no idea how to use it.
    Generally, it is a good idea to read the manual before asking questions: GitHub Help

    Quote Originally Posted by endrick
    Do you copy your codes and paste them there? or there is a way to upload your project so that others can use it and see how it works if you upload files of your project which one do you upload? the one with codes only? or the whole folder? i am learning c now but i don't know how to put my projects on github. help me out.
    If you had read GitHub's help pages, you would have seen:
    Quote Originally Posted by GitHub
    At the heart of GitHub is an open source version control system (VCS) called Git. Git is responsible for everything GitHub-related that happens locally on your computer.
    Basically, GitHub is a code hosting service intended for people to host their code (and other things) under version control in Git repositories. Hence, besides learning how to use GitHub, you need to learn how to use Git. I believe GitHub provides some guidance on how to use Git, but there are other resources available that focus on the topic, e.g., Pro Git book.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    If you are on Windows, I suggest downloading GitHub Desktop and using that until you learn more about git. git is a severe pain in the ass and GitHub Desktop will take away some of the pain.

  4. #4
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Commit, pull, push. Boom.

  5. #5
    Tweaking master Aslaville's Avatar
    Join Date
    Sep 2012
    Location
    Rogueport
    Posts
    528
    Quote Originally Posted by MutantJohn View Post
    Commit, pull, push. Boom.
    Totally missed the essence of version control

  6. #6
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Posts
    2,158
    Quote Originally Posted by MutantJohn View Post
    Commit, pull, push. Boom.
    Tsk tsk, don't just go pulling and pushing what ever you like, be sure to request first.

  7. #7
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by Aslaville View Post
    Totally missed the essence of version control
    No such thing. Always rolling release. Git history. Boom. Bada bing!

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by MutantJohn View Post
    No such thing. Always rolling release. Git history. Boom. Bada bing!
    You are a pushover.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Quote Originally Posted by Mario F. View Post
    You are a pushover.
    Well, duh! That's how you get the rolling release to start rolling!

    Edit: As a serious aside, I hope it was obvious that my posts were of a joking nature.

    But I'm not sure what to say to the OP that laser didn't link to.

    I think the basic commands were,
    Code:
    git add /whatever/stuff/you/have/
    git commit -m "my commit message"
    git pull
    /* run tests to make sure nothing you pulled broke what you had */ 
    git push
    or at least, this is the git flow that I'm the most comfortable with. Yarin brought up a good point about doing requests. That would be something I'd do for a public project that I'd want to contribute to.

  10. #10
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by MutantJohn View Post
    Yarin brought up a good point about doing requests. That would be something I'd do for a public project that I'd want to contribute to.
    You're always talking about meshing--you should get involved with some of the projects concerning meshing, simulation, computational physics, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. want to clean up project to post on github
    By sneakyimp in forum C Programming
    Replies: 11
    Last Post: 09-30-2015, 06:09 PM
  2. How do I compare cloned github projects?
    By KenJackson in forum Tech Board
    Replies: 2
    Last Post: 06-09-2013, 10:39 AM
  3. Replies: 7
    Last Post: 10-20-2010, 11:25 PM