Git Command Line Guide - Texera/texera GitHub Wiki

This is the guide of how to use git command line to work on the Texera project:

  1. Sign up a Github account and make sure you have permission to contribute to the Texera project.
  2. Search https://github.com/Texera/texera/wiki in Github
  3. For the new developers, Run the command git clone https://github.com/Texera/texera.git to clone the repository to your local computer.
  4. After cloning, navigate to the texera/core folder you just downloaded and run the command git branch. This command will show the current branch you are in, which will be master right now.
  5. Since master branch is used by the user, we wouldn't want it to become vulnerable because of unreviewed codebase, therefore, all Texera developers should work on their own branches.
  6. To create new branch, run the command git checkout -b your-branch-name to create new branch. Suppose my name is Joe and I work on a regex operator, I'll do git checkout -b joe-regex-operator. Run git branch again and you will see you are now in the new branch you have created.
  7. Assume that you make some changes to the code, run git status to check the files added / changed / deleted.
  8. After confirming that these are the changes you made, run git add . to add the changes to a stack. Then, run git commit -m "commit message" to label the changes on the stack.
  9. Then, execute git push to push this commit to the Github so that other developers can pull your code down and test it.
  10. Repeat step 7 - 9 if you make changes to your branch.
  11. To change a branch, execute git checkout branch_name
  12. If someone other than yourself update your current branch, in order to receive the update, run git pull command to pull the new changes to your local repository.
  13. If you are merging your branch with other branch, run git pull origin "branch_to_pull_from".