-
Notifications
You must be signed in to change notification settings - Fork 75
Git Command Line Guide
Zuozhi Wang edited this page Oct 29, 2020
·
5 revisions
- Sign up a Github account and make sure you have permission to contribute to the Texera project.
- Search https://github.com/Texera/texera/wiki in Github
- For the new developers, Run the command
git clone https://github.com/Texera/texera.git
to clone the repository to your local computer. - After cloning, navigate to the
texera/core
folder you just downloaded and run the commandgit branch
. This command will show the current branch you are in, which will bemaster
right now. - 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. - 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 dogit checkout -b joe-regex-operator
. Rungit branch
again and you will see you are now in the new branch you have created. - Assume that you make some changes to the code, run
git status
to check the files added / changed / deleted. - After confirming that these are the changes you made, run
git add .
to add the changes to a stack. Then, rungit commit -m "commit message"
to label the changes on the stack. - Then, execute
git push
to push this commit to the Github so that other developers can pull your code down and test it. - Repeat step 7 - 9 if you make changes to your branch.
- To change a branch, execute
git checkout branch_name
- 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. - If you are merging your branch with other branch, run
git pull origin "branch_to_pull_from"
.