2 Answers
You’re right, but fortunately, there is a solution.
Git has a feature called stashing. Basically, you can make changes to your files. Before you download a copy of the new contents of the repository, git can stash these changes you’ve made, to bring them back after the download.
In Mattias’s update.sh
script, he brilliantly added in this functionality, and git will stash any changes before downloading the full copy. To retrieve them, go to the gcp-cloud-engineer
directory, and run the command git stash apply
. This should bring back everything from the stash.
It might be better to fork the Github project. Then you can:
1. Clone the project from your fork.
2. Push changes to your fork.
You can read about forking here: https://help.github.com/en/github/getting-started-with-github/fork-a-repo
Thanks Stephen, I will check stash option.