Version Control Application in Daily Workflow

It’s time to replace the onerous copies of versions with Git’s version control. Cursor’s integrated Git commands and Review tab sided with chat are meant for it. Here are the steps to follow:

  1. go to the github page to create the new repo, copy the git page info
  2. git init gitfolder already, then cd gitfolder, git push github repo
  3. open the gitfolder folder in cursor (because I may create a shared package file: primer.py in this folder), then navigate to the subfolder/repo to start working
  4. git add yourfile.txt # Replace with your actual file name; git commit -m “Your commit message”
  5. git tag -a v1.0 -m “Version 1.0” a means an annotated tag is created, -m allows to add message for the tag
  6. git push origin v1.0 to push to remote repo
  7. now need to do editing, first create a new branch (like a copy) to work on it: git checkout -b feature/v2.0
  8. then do the same staging and committing: git add yourfile.txt; it commit -m “Update for version 2.0”
  9. then merge it to main branch: git checkout main; git merge feature/v2.0
  10. now tag the main as v2.0: git tag -a v2.0 -m “Version 2.0”
  11. push the changes and tags to remote repo: git push origin main; git push origin v2.0

Leave a comment

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