I want to setup a local directory to push new file modifications to my Bitbucket Git repository. I originally setup a directory using the instructions online at Bitbucket, but then have since moved the location of this directory to a different location. I now get errors and I have been trying to setup this local directory.
Example: I moved
'folder/another_folder/folder_I_want_to_push_updates'
to
'folder/folder_I_want_to_push_updates'
I try the following commands and get these errors:
cd folder
in
folder
I have the sub directory
'folder_I_want_to_push_updates'
and other folders. I want to push documents to Bitbucket within sub-directories in
'folder_I_want_to_push_updates'.
$ git init
Reinitialized existing Git repository in 'folder/folder_I_want_to_push_updates'
$ git clone https://account@bitbucket.org/account/repository.git
repository has same name as 'subfolder_in_folder_I_want_to_push_updates'
fatal: destination path 'subfolder_in_folder_I_want_to_push_updates' already exists and is not an empty directory.
$ git add .
(no errors)
$ git commit -m subfolder/file.m
[master 8ac5364] subfolder/file.m Committer: name Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly. Run the following command and follow the instructions in your editor to edit your configuration file:
git config --global --edit
After doing this, you may fix the identity used for this commit with:
git commit --amend --reset-author
1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test
$git push origin
warning: push.default is unset; its implicit value has changed in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the traditional behavior ........... ........... etc. fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream
I guess there is a simple solution but I am new to Git and struggling to work it out.
Is there a way I can start over and remove all links and reconfigure a local repository to Bitbucket?