Quite new to git and mac.
But I'm using the Git Plus
in Atom to handle all my version control via git. But I'm having a lot problems if I add components/libs via bower to my ionic project.
Working on branch quick_fix
and adding a angular-cookies
(ionic stores it in a folder called lib
). Update the code and do some commits.
Had some problems doing it in Atom after using bower
, so try the terminal. So I do the following in the Terminal:
git checkout master
warning: unable to unlink www/lib/angular-cookies/.bower.json: Permission denied
warning: unable to unlink www/lib/angular-cookies/LICENSE.md: Permission denied
warning: unable to unlink www/lib/angular-cookies/README.md: Permission denied
warning: unable to unlink www/lib/angular-cookies/angular-cookies.js: Permission denied
warning: unable to unlink www/lib/angular-cookies/angular-cookies.min.js: Permission denied
warning: unable to unlink www/lib/angular-cookies/angular-cookies.min.js.map: Permission denied
warning: unable to unlink www/lib/angular-cookies/bower.json: Permission denied
warning: unable to unlink www/lib/angular-cookies/index.js: Permission denied
warning: unable to unlink www/lib/angular-cookies/package.json: Permission denied
So these files are now still in the folder... even though that I'm back to the master code that doesn't have the hot fixes...
git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
www/lib/angular-cookies/
If I try to do a merge I get the following
sudo git merge quick_fix
Updating 034f577..8b74fa5
error: The following untracked working tree files would be overwritten by merge:
www/lib/angular-cookies/.bower.json
www/lib/angular-cookies/LICENSE.md
www/lib/angular-cookies/README.md
www/lib/angular-cookies/angular-cookies.js
www/lib/angular-cookies/angular-cookies.min.js
www/lib/angular-cookies/angular-cookies.min.js.map
www/lib/angular-cookies/bower.json
www/lib/angular-cookies/index.js
www/lib/angular-cookies/package.json
Please move or remove them before you can merge.
Aborting
How do I do a merge?
I think that the problem has to do with doing a checkout to master without doing sudo
. So I'm not giving it permission to delete the folders.. Is there any way I can give permanent sudo permissions to delete files in this working directory - so the Atom editor can do a checkout to master without keeping the added component..
Problem is that I can't checkout quick_fix
because it gives me the same error and aborts.