Jump to content
  • 0

Git commands


Tales

Question


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.04
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

Hellow!

Now i'm starting a "Oficial-Based" server with git commands...
 

i'm using

git clone https://github.com/rathena/rathena.git ~/rathena

to download the latest git from rathena... my doubt is:

1 - When someone update the master-branch, how can i update my git?

2 - If i make some changes in my source, i'll lost'em when update?
 

  • Love 1
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

- You can use stash save to save the changes

- Then git pull to update

- Stash pop to put the changes back

Edited by Lord Ganja
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   11
  • Joined:  04/13/12
  • Last Seen:  

You can also create a new branch with  "git branch <branchname>" where you apply your changes and everytime you "git pull" the master branch simply merge the changes into you

server branch.

 

The good thing is that you can setup a test branch before you apply the changes to your server.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  163
  • Topics Per Day:  0.04
  • Content Count:  319
  • Reputation:   8
  • Joined:  02/05/12
  • Last Seen:  

Can you show the commands?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   11
  • Joined:  04/13/12
  • Last Seen:  

if you really want to start working with git, you should read yourself into it.

Otherwise it may happen that you mess up at some point if you dont know how to deal with certain commands properly.

 

https://git-scm.com/book/en/v2/Getting-Started-Git-Basics

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...