Open MarkuBu opened 6 years ago
Thankyou for this!
All I do after I finish editing, I type:
git add -A
git commit
git push
inside the root directory of my fork of the non-master branch.
Yeah, but please add a message to each commit
I'll do that.
This issue should help you develop with git. I will use commandline commands. If you use a GUI you shoud execute the corresponding function.
The most important rules:
To reduce issues while merging, talk to the other devs. It helps if two people never work on the same file. If possible always work in a separate mod.
First read Getting Started - Git Basics. This helps to understand how git works
To create a new branch use the checkout command. Make sure that you are at the master and pull the latest updates before checkout a new branch
git checkout -b "your_project"
To check if you are in the correct branch use
git status
To change the branch use the checkout command, but without -b
git checkout "your_project"
Create and edit you files as usual. To add your changes use the add command. For example
git add README.txt
You can add all changes at once like this
git add .
If you are happy with your changes create a commit with a message, that gives a short explanation what you have done.
git commit -m "Fixed some typos in README.txt
Use
git commit
frequently to keep track of your work. That makes it easier to go back to a working state, if you messed up things.Read Undoing-Things how you can repair your mess ;-)
Important: if you want to switch to another branch you need to commit first
Use
git status
frequently to check the status of your branchWith a commit nothing is moved to the server. To publish and share your work with others use
git push origin your_project
If everything is tested and works you can merge your branch to the master. First you need to checkout to the master and make sure that the master is up to date
Make a test with the master before you push everything to the server
Read Basic Branching and Merging. It is helpful to understand how branching and merging works