Writes just such a mistake

enter image description here

I understand that the path or directory is not correctly specified ... But when I go to the settings, everything seems to be correct there.

enter image description here

what am I doing wrong?

  • 2
    Keeping the repository in the dropbox is just an idea. This is so note. - D-side
  • one
    So why do you need a githab with branches? .-. - D-side
  • one
    Git is a version control system. and GitHub is hosting for its repositories. - D-side
  • one
    And the problem is clearly not in git, but in Android Studio. Understand the directories on your disk. Simply put - a directory in which there is a .git folder and is Git root - newman
  • one
    Do not use Dropbox to back up your Git repositories. For this, Git is a distributed version control system - the repository can and should be backed up in another repository. Use any hosting repository, such as GitHub or Bitbucket. - Nick Volynkin

1 answer 1

Do not use Dropbox to back up your Git repositories. For this, Git is a distributed version control system - the repository can and should be backed up in another repository. Use any hosting repository, such as GitHub or Bitbucket.

I propose a radical way to correct the error - do it all over again and correctly.

The steps are:

  1. Transfer your project files to a folder that does not lie inside Dropbox.
  2. It is not clear whether you have a repository there now or not. So in the root folder of your project (re) initialize Git :

     cd /home/aleksey/projects/learnhebrew/ rm -r .git git init 
  3. Since you have an IDE, there are many unchecked version files. Add .gitignore .
  4. Register on any hosting. (Github is more popular for open source, Bitbucket allows free non-public repos).
  5. Create a project there and follow the instructions for connecting it to the local one.

Now you have the following standard workflow:

  1. Add files to the index - this is the preparation of the next commit.

     git add somedir someotherdir and/a/file.txt git add . # передумали? можно убрать файл из индекса git reset filename.txt path 
  2. Make a commit from index (it keeps a snapshot of the project working folder at a certain moment):

     git commit -m 'message to explain changes' 
  3. Send to remote repository using push :

     # в первый раз git push -u origin master # потом git push 
  • I moved the folder with my project to another directory (not dropbox), then I clicked into the newly created directory where I transferred my project and executed the command as it is written in paragraph 2 and this is what the console shows "rm: cannot remove '.git / objects / a1 ': Directory not empty rm: remove write-protected regular file' .git / objects / 60 / 542fb7c5b9b1fafaa57314125094690f50038 '? " when I press enter again the same thing shows ... WHAT am I doing wrong? - Aleksey Timoshchenko