Skip to content

Instantly share code, notes, and snippets.

@fluteds
Last active May 16, 2021 17:42
Show Gist options
  • Save fluteds/8e0f3b5d5f29f7440cd251a8b704d29a to your computer and use it in GitHub Desktop.
Save fluteds/8e0f3b5d5f29f7440cd251a8b704d29a to your computer and use it in GitHub Desktop.
An edit for the last lines of the Gitfiti POWERSHELL script to use ssh logins and pushes

Gitfiti Powershell Fix

If another branch is used for something else e.g. let's say you used master this commit will create a new branch called main. If this happens the new branch will not show until merged with the master branch or switch your default branch to main to show the effects. Switching -u to -f avoids fatal errors when running Gitfiti again on the same repo.

Replace the last lines of the Powershell script output with the following:

git remote set-url origin https://github.com/fluteds/reponame.git
git remote add origin https://github.com/fluteds/reponame.git
git branch -M main
git push -f origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment