I don't know how to "disable" github off my code, because I tried to move them out of a folder, but they still have github changes, and other github related stuff. I want to make them just simple files on a computer (html, css, js), with no Github.
Just remove the folder .git in the top folder, and it wont track git anymore.
rm -rf .git
Related
I want to move my HTML, CSS, and JavaScript files into the sortable-list folder.
I intended to push the files of my sortable-list project into a folder named sortable-list in my javascript-projects repository. However, when I pushed the files using the cli, it added all the files directly to my zaidazim/javascript-projects repo.
I wish to move the files into the sortable-list folder, so that in the future I can add more project folders here.
How can I achieve that?
P.S.~ I've read some of the previously asked questions but they haven't really helped me much.
If you have that repository cloned locally, simply use git mv
cd /path/to/repo
git mv script.js sortable-list
git commit -m "move file"
git push
I'm new at GitHub and I'm having this issue: I created three private repositories for my project, all fine. On the fourth one, for some reason GitHub desktop included the node_modules folder (its an angular cli app), so I deleted the repository from GitHub.com and from GitHub desktop. When I try to recreate it, it is "cached" on my Mac, even if I copy everything to another folder, and it tries to upload the node_module files.
I also changed the name of the repository, copied all the files but node_modules folder to another folder. Same happens over and over.
I couldn't find anything on internet about this. Sorry if its a newbie question.
You could try to delete the git folder that it's being hidden by default.
Go to in file explore -Views- select "Hidden Items" and try to remove the git folder from here. After that set up your .gitignore file and pass node_modules before you use git init
Use this in your terminal, if you are using VS Code use this in the same folder you are having the problem : git config --global core.excludesfile '~/.gitignore'
My github repository is: https://github.com/zorlakov/moviesAndShows
In order to get to the react files and folders (src, public etc) you first have to open the movies-and-shows folder. I was thinking to copy all the content from that folder into the parent folder, and then delete that folder and push to github. Could this create a problem?
This should not be a problem for Github, or even Git.
However, if you want to keep history and ensure that Git is able to detect move/renames, you should work by steps:
git mv moves-and-shows/public .
git mv moves-and-shows/src .
git commit -m 'move public and src to root'
For the other files, it should also work.
I do expect that you will also have to fix hard coded path (replace moves-and-shows/public by public and so on).
I am new to Sourcetree and source control in general. I am working on an Android project with a few other people and use bitbucket as the repository. I have learned the basics but don't want to track certain files in my local, specifically a lot of the gradle and iml files. But i think Stop tracking will remove those from the repo. Is there a way to just have source tree ignore any changes i make to certain files locally but not delete them from the repo ?
Thank you in advance
You can create a file and name it .gitignore in the root of the project and in that file place every directory to exclude by git like:
my_folder
my_folder2
The above would be excluded from git tracked files.
If you are already tracking files this command will remove them from index:
git rm -r --cached <folder>
see the Git Ignore option in the below image.What I have to choose, I am creating an ionic-framework repository.
https://i.stack.imgur.com/pBvkd.png
.gitignore is a file which, Git uses to determine which files and directories to ignore, before you make a commit. These files/directories will not be pushed into the repository.
If you have any files or directories that don't need to be pushed into the repository, then you can include them. (a simple example : log files)
If there is no ionic option, you can ignore it, and create it locally on your repo, then push it back to your GitHub repo.
To create it, see https://www.gitignore.io/api/ionic3
It does generate an Ionic .gitignore for you.