Due to other factors, updates to particular development projects had to be done in a way where the projects were not associated with the original Bitbucket repository. In order to upload the code, we need to remove the current content in the repository in a way that allows us to just do a GIT INIT with the entirety of the code.
What steps should we follow to remove all repository content so we can do a GIT INIT with a repository?
Thanks @Saxea _Flowie_. Quick question. We are trying to do just the delete part on the BitBucket side. Then we will do the Init from our development tool. We need to delete first as the functions within our development tool don't offer the -f equivalent.
Are those steps just for the deletion/reset of the repo or are they facilitating the INIT as well? It's the delete/reset that we need. Are these functions we can perform from the BitBucket front end? Thanks very much for your response and support. Jamie
You can't "delete" in git, but you can replace the history using the -f(force). So these are the steps to replace content. Even if you "delete" by replacing with an empty repository, to "upload" the code you will the to replace the empty repository again.
I don't think you can "replace" the content from Bitbucket interface. The closest to this would be to delete and re-create the repo - which I assume you don't want to do it.
Are those steps just for the deletion/reset of the repo or are they facilitating the INIT as well?
It does the init as well. However, if you prefer, you can do everything from your tool and just do the push -f
from the command line. Typically, there's no difference whether it's done via GUI or command line; you can mix and they interop fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Something like this should do it. Key thing is to use '-f' when pushing, to override the content on the remote:
rm -rf .git
git init
git add .
git commit -m "Initial commit"
git remote add origin <remote_repository_url>
git push -f origin main
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.