Get a local copy of a GitHub repo, track changes and push updates back to the remote

后端 未结 4 928
眼角桃花
眼角桃花 2020-12-29 16:29

I have a repo on GitHub and I want to update it with changes made to the folder I pulled it from.

What are the steps, without jargon or short hand terms, a new Git u

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 17:26

    The most simple flow is this:

    # clone the repository (from github, for example)
    git clone git@github.com:username/reponame.git
    cd reponame    
    
    # edit some files
    
    # add them to the index
    git add file1.txt
    git add file2.gif
    
    # review your changes
    git status    
    
    # commit the changes
    git commit -m "Decription of my change"
    
    # push them back to the remote repository
    git push origin master
    

    This is the basic flow that should get you going. However, there's lots of resources for learning the basics of git, I highly recommend you go over them. Getting started is really not that difficult as it seems.

提交回复
热议问题