Move files into a folder in GitHub (At their website) - github

I would like to move files and (if possible) folders into another folder, at a Git repository (trough the GitHub website - so not using the terminal).
Is this possible? if so, how?

A solution is described in the GitHub docs here.
You browse to the file you want to move, click on Edit this file and change the path to your desired path.

You might have to experiment around but the following might be helpful:
This will show you how to move/rename files. You can change the folder path: https://github.blog/2013-03-15-moving-and-renaming-files-on-github/
This here will show you how to create a folder: https://github.community/t/add-a-folder/2304
Renaming a folder will be difficult. How many files are in this folder? You essentially move a file. It's a bloody pain.
I'll adjust this with additional tips.

Related

How to find the location of .gitattributes on Github.com?

Where can I find .gitattributes file on GitHub website or in my repository? I don't use git command line and use website for all uploads. Recently I have posted a SQLite file along with a Python file but in languages it is showing only Python.
Before you read my answer, kindly check https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes
It effectively tells you that you either have a file of .git/info/attributes or you might have a .gitattributes file somewhere.
You can search for any files (including .gitattributes) via clicking on the Go To File button
and then typing in the file you are searching for (.gitattributes in this case):
If you find your file, good! If not, then you will need (sorry !) to clone your project and check whether there is a .git/info/attributes/ file and see whether there are any attributes that are contradicting your aim. You can create a .gitattributes file (if it doesn't exist) in your root folder and git push it.

How to ignore files via GUI in Gitkraken?

I come from SourceTree to board the GitKraken hype train. It has always been pretty easy to ignore files within ST. Just right-click on a file in the unstaged container and you've all the options. You can ignore the files directly, each file beneath a specific folder etc. (so, all the .gitignore stuff from within the GUI =)).
However, I can't find a similar feature in GitKraken. Does anybody know how I can ignore files via the GUI of GitKraken?
Please note: This is not a git question. I absolutely know in depth how ignoring files in Git work. But that's not the topic whatsoever. This is just a trivial GitKraken support question.
Currently there isn't an option to ignore a file through the GitKraken GUI.
If you check their post on twitter this is planned to be implemented soon and it will be in their release notes once this is completed.
UPDATE (26.01.2017.):
Version 2.0.0 brings the .gitignore option to the list of functionalities. You can now select a file or folder in the file staging area, and add to the .gitignore file on the fly. Right-click and select Ignore. From there, you can:
Add that specific file to .gitignore
Add all files with that file extension to .gitignore
Add all files in the same folder as the selected file to
.gitignore
(If selecting a folder) add that folder to the .gitignore

Is it possible to create a sub-folder directly through the GitHub web application?

Sorry if this is a dumb question. I have looked over the documentation and my search for directory or folder did not come up except in reference to cloning entire github directories.
I have also looked over this a previous question "How do I add files and folders into github repos?", but it does not seem to answer this question.
An example of what I am trying to create can be found at https://github.com/rstudio/shiny/R with R being the sub-directory that I would like to create.
Thank you as always for your consideration,
Francis
Git only tracks files, not directories. So you can't have an empty directory, it mush have at least one file in it, in order to be in git.
You can create a new file in a new directory through GitHub's web-interface. See this explanation.
You can specify a new file in a new directory in the file name like directory/file.r or dir/subdir/file.r.
If you don't want any code in the directory, you could add a blank file named README.
P.S. That repo already has a directory R, you can see it here

How can I add a directory tree to my github repo?

I've been working on a project that's fairly far a long now and I decided it's time to use some sort of version control etc. I decided to go with github. Before I get in too deep let me state explicitly that I am new to github.
My project resides in a directory that contains myriad subdirectories and files of all different kinds. I'd like to take my project directory as is (structure and all) and put it in my github repo.
I followed the tutorials on github's webpage, created the repo, and manually added some files. Obviously I don't want to manually add every file (there are several hundred). I'd like to know how I can add the root directory or for that matter any parent directory and all files/folders in said said directory. In other words I'm looking for a recursive add.
I read on this SO page (How to create folder in github repository?) that you can just use
git add directory/
That works fine for me when I'm dealing with the lowest level directory, but when I try the same command on a directory with subdirectories my terminal just sits there and I have to ctrl-c. I can't tell if it's just taking a long time (as I mentioned there are lots of files) or if this is just the wrong way to add a directory with subdirectories.
Apologies in advance if this is a super ignorant question -- I have looked at a lot of blogs/posts/etc and I cannot find a solution that seems to work.
Use the Current Working Directory
Assuming you're on Linux or OS X, from the command line you would do the following:
git add .
from the root of your repository tree. That will add all non-ignored files, including non-empty directories, into the repository.
From the root directory (the one with all the subdirectories), use git add -A.
If you have a ton of subdirectories and files, it may take a long while, so just let it sit there until it's done.

Sublime Text source folder to another location?

I am coming from Netbeans and one feature I like is copy source folder to another location. This allowed me to work on local repository files in a designated repo file seperate from my wamp/lamp/mamp server files. Than after finished I can commit and push off to github.
With Sublime Text 2, is there an option/package that allows me for projects to cop source folder to another folder much like what I just described?
I had similar problem. I didn't found any sublime packages so I used AutoVer application which monitors some folder and backups its content to another location. I used this solution to copy html files to web root. Hope it helps.