-
Notifications
You must be signed in to change notification settings - Fork 412
Git
This wiki describes a workflow where you clone and work from the main Spark repository. There are other, equally valid workflows for using git and Github.
Get the spark source code:
git clone https://github.com/dart-lang/spark.git
The checked out source code will be the master. Create and switch to a branch to work in:
git checkout -b mywork
In order to create a cl, you should do a git add for the files that are part of the change:
git add changed-file1
git add changed-file2
Then do a git commit to stage the change locally:
git commit -m "my commit message"
Push the change to github, make sure you specify a branch name:
git push origin mybranch
There will be a new branch, with all your work, at dart-lang/spark. You can review your changes and re-push new changes up if necessary. To ask for a review, click on the 'Create pull request' button. In the text box, enter a description of the change, and add the names of reviewers:
review @user1 @user2
Those users will get notified by email when they are referenced in a Github pull request.
Once you have received a lgtm
, merge the pull request; you can do this using the 'Merge pull request' button. Once the merge is done, you can delete the branch.
In order to sync up with the latest changes to master:
git checkout master
git pull
Show all modified files:
git status
You’ve done work in a branch, but new changes have been pushed into spark/master
. First, make sure all changes in your branch are added and committed. Then,
git checkout master
git pull
git checkout my-branch
git merge master