forked from Azure/PyRIT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: Adding Identifiers to Memory (Azure#145)
* Adding Identifiers to Memory * Adding squash commit shortcut * reverting notebook * PR feedback * PR feedback
- Loading branch information
Showing
54 changed files
with
901 additions
and
1,368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
param( | ||
[string]$CommitMessage, | ||
[string]$fork | ||
) | ||
|
||
$mainBranch = 'main' | ||
$featureBranch = git rev-parse --abbrev-ref HEAD | ||
|
||
git fetch origin $mainBranch | ||
|
||
# Check out the feature branch (though you should already be on it) | ||
git checkout $featureBranch | ||
|
||
git rebase -i origin/$mainBranch | ||
|
||
# Squash commits | ||
# Note: The interactive rebase '-i' will open an editor to squash commits manually | ||
# Replace 'pick' with 'squash' beside all but the first commit to combine them | ||
|
||
# If you're not comfortable with the interactive mode or want to automate: | ||
# Assuming you want to squash all commits made on the feature branch since it diverged from main: | ||
$commitCount = (git rev-list --count HEAD ^origin/$mainBranch) | ||
if ($commitCount -gt 1) { | ||
git reset --soft "HEAD~$commitCount" | ||
git commit -m $CommitMessage | ||
} | ||
|
||
# Push changes to the remote repository | ||
git push $fork $featureBranch --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.