- Loading...
...
If you are using Git version 2.24 or newer you can also use the command: git switch --create <NAME-OF-BRANCH>
Code Block |
---|
$ git branch -D <NAME-OF-BRANCH> |
...
If you are using the Skara CLI tools then and have the branch you want to publish currently checked out, then you can just run the command git publish
...
Code Block |
---|
$ git merge <OTHER-BRANCH>push --delete origin <NAME-OF-BRANCH> |
Note: the above command assumes that the branch exists in the remote repository that origin is referring to.
Code Block |
---|
$ git merge <OTHER-BRANCH> |
Code Block |
---|
$ git log --graph --pretty=oneline --first-parent --abbrev-commit master..HEAD |
...
In many cases, for example when working on a pull request, you can just make an additional commit and push it. The Skara integrate command will squash (collapse) the commits in the pull request into a single commit before integrating it, so the final result will be as if you only had made one commit. If you still want to mutate history in an active pull request, it will make it much harder for reviewers to follow the changes.
If you still want to mutate history and update the last commit, first add the and update the last commit, first add the files you want to add to the commit:
...
git pr set --body.
To modify your patch in a pull request, just push more changes to the branch the pull request is based on. Avoid modifying changes that are already part of the pull request branch or force pushing unrelated changes as that will mess up the pull request and make it hard for reviewers to make sense of it. When Skara integrates the pull request, all the changes will be squashed into a single change anyway.
If your pull request slips too far behind the target branch (e.g. the master branch in the mainline jdk repository), you will need to pull in changes from master and resolve any conflicts before you can integrate. When doing so, it's usually preferred to merge the changes rather than rebasing, especially if the reviews have already started on the pull request. If changes are rebased, the history in the pull request becomes problematic and hard to follow for reviewers. When Skara integrates the pull request, all the changes will be squashed into a single change anyway.
...