GitHub Copilot rocks, somewhat.

Yesterday, got myself totally tangled up with git branches on my local machine and pushed a PR to a GitHub repo that included files that didn’t belong to the respective branch. I closed the PR right away but still had to clean up my local stuff. 

For the first time I conferred with GitHub’s Copilot to get myself out of the mess. 

A big disadvantage is that you can’t get a Copilot history. I asked about it and this is the answer: 

“GitHub Copilot Chat does not currently provide a built-in feature to view your chat history. Each session is temporary and does not persist beyond the current conversation. If you want to save a record of a discussion, you can manually copy the conversation or take notes.

I learned a few more git commands: 

  •  git push origin --delete docs/update-styles: delete a branch at the remote repo
  • git log -n 2 -- : get the last two commits on a particular file. You get a list of commit hash and date of the change back. 
  • git revert <hash> with the hash value from the log you can revert commits.
  •  git reset --hard origin/trunk :Cleans up my local /trunk branch to match the remote branch

When I pushed my new PR to the repo, I changed it afterward to draft, to iron out some copy and make sure I read the documentation update. Somehow the GitHub UI doesn’t give you a “Ready for review” button once you do that. I ask Copilot how I can make the PR again `Ready for Review` with the button. It gave me about three different methods, and all didn’t work, all hallucinations. 

So I asked Perplexity and got the right command back

gh pr ready <url to PR>

The whole purpose of this post is to keep track of my conversation with Copilot. But I will use it more and see how I can add it to my VS Code editor, so I don’t have to switch windows. 

If you stumbled upon this blog post, I’d like to connect and learn how you use Copilot. Leave a comment, please. 

This is also my first post using Dave Winer’s Wordland.


Four things about Wordland, I didn’t like.

  • The post is pushed as a classic block, so to further edit one needs to covert it to blocks first
  • The ticks weren’t converted to inline code view and lost the piece within < > tags.
  • While writing in WordLand, adding a link takes two steps instead of the one “copy/paste URL “step that’s so common now in WordPress block editor, GitHub, Slack.
  • I have a huge list of WordPress.com sites and I needed to scroll through the provided list. This is only cumbersome because I am an Automattic employee and all our internal blogs are also listed. I’d rather have a setting that identifies the most common sites stored and select from there.

I code for a purpose
I code for a purpose
@pauli@icodeforapurpose.com

Personal tech blog of Birgit Pauli-Haack

50 posts
3 followers

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.