Can moving folders/files in github cause a problem? - github

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).

Related

Move files into an existing folder in GitHub

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

How to transfer files out of a Github repository?

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

SourceTree permanent local discard

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>

what Git Ignore field means in github desktop while creating a new repository

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.

Creating new git repository, can't add directory

I am about to throw my laptop through a wall, and am hoping for help before reaching that point. For reference, I am following these instructions exactly - https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/.
I have a directory ".../path/thisdir". Inside of thisdir are (1) a file called Demo.R and (2) a directory called sportVU. sportVU is a directory with ~15 files in it.
When I follow the instructions in that link, my github repo looks like this:
https://github.com/NicholasCanova/packageSportVU
Notice that the sportVU directory link cannot be clicked in github, and when I download the repo, sportVU is an empty folder. Why is this happening? This shouldn't be so tough.
EDIT: this is what the repo looks like in my local machine, I'm 100% sure it's not empty:
It could be that you have two .git folder in your directory. View hidden folders to see.
Similar questions:
What does a grey icon in remote GitHub mean
Why can I not open my folder in GitHub?
Since Git doesn't store empty folders the steps you should follow exactly are:
Delete the old repo and start again following exactly my steps.
git clone <repo url>
Inside the folder of the cloned repo create a directory manually and name it as you want i.e sportVU.
Drag and Drop all the files you want in the sportVU direcrory.
cd to Myrepo/sportVU and type git add *
type git commit -m "added some files"
git push -u origin master.
and you should be all set