I have private github repository with folders : lab1, lab2, lab3 etc.
I pulled it and added inside lab1 java project called "ArabskieNaRzymskie".
Inside this project there are some files and there are not seen by TortoiseGit!
How can I commit all of there files? (It is not .gitignore problem)
GitHub GRAY folder(not clickable)
inside "ArabskieNaRzymskie" folder (no any icon from TortoiseGit)
On GitHub, your "ArabskieNaRzymskie" folder should be a Submodule if the folder icon is (not ), which means ArabskieNaRzymskie is also a repository. Try to show the hiding folder and file on Windows, you will see a .git file or .git folder.
Since it's a repository, you need to commit your changes/files inner that repository.
(In your super repository, you only see "ArabskieNaRzymskie" as a submodule or embedded repository with a "folder" icon. Thay's why you can't see those files inner ArabskieNaRzymskie folder.)
Related
I am new to git, so I used git to put my ionic project folder into local repository then push it, it did not appear as the normal repository I saw.
It then becomes submodule, so I cloned the repository, then the folder became empty, then I could not find my file but a empty folder.
Can someone tell me how to find my missing file and why I tried to push a simple folder then it becomes submodule?
put my ionic project folder into local repository then push it, it didn't appear as the normal repository I saw , It becomes submodule
That is because your ionic project folder already included its own .git/ subfolder.
Once copied into your local repo (which also has its own .git/ subfolder), the ionic project folder is considered as a nested repository, and only a gitlink (reference to the root tree SHA1 of ionic/) is recorded and pushed by your local repository.
Hence the "submodule-like" empty folder on the remote side.
If you don't care about the history of that project, you could simply copy its files into your local repo, add, commit and push.
I want simply add a new File or Folder to an existing Repo in my Eclipse.
I tried the following (add index on the file and folder), but nothing happens.
Can someone help me.
In Git, a new file must first be added to the index (also called staging area) and then committed before the file becomes part of the history:
Add files:
Right-click and choose Team > Add to Index or
in the Git Staging view move the file from Unstaged Changes down to Staged Changes
Commit files: In the Git Staging view enter a Commit Message and click Commit
Result: In the History view a new commit containing the files is shown.
Please note in Git (in contrast to e.g. SVN) only files, but not empty folders can be committed.
Check the properties on that folder to get its path.
Switch to command line, and do a git status (if you have Git installed), to check if the folder and its content is actually in a Git repo (or if only "src" is):
Chec at least if you see a .git folder above the folder you want to add to the index, you should be able to do so from Eclipse.
But if not, that would explain why adding it does nothing.
Android studio is not pushing java files to github. I found that it only pushed the src folder with the res (layouts and xml docs) folder. I tried adding the java folder to it (right click, add, then commit directory, and push), but it still does not push the java files to git.
Used this setup:
https://www.londonappdeveloper.com/how-to-use-git-hub-with-android-studio/
.gitignore:
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
When I right click on the Main folder (which holds the java files) and select commit directory, I get the following error:
Error:On branch master
nothing to commit, working directory clean
during executing git commit --only -F C:\Users\mmm\AppData\Local\Temp\git-commit-msg-999645.txt -- MainActivity.java
Did it through gitbash following the instructions here:
https://help.github.com/articles/adding-a-file-to-a-repository-from-the-command-line/
Right clicked on the main folder (containing the java files) and selected gitbash.
I ran into this issue recently. If your .gitignore looks good, you may want to check Git (local git repository) first and see if the .java files show up there.
The folder (/apps/src/main/java/myproject/bleh) where .java files were stored was flagged as "* Git Repository (subproject)" by Git and that was a consequence of a hidden .git file stored there.
Fixed it by deleting that .git file and adding the files to the repository.
I am new to git. I downloaded the desktop version (for Windows). I dragged the folder containing my project into the big window, "Get started by adding a repository." All the files showed up in the left window. Then I clicked on "Publish Repository". It then shows 143 files have changed, with 0 unsynced.
But when I go to my account on the git website, the repository is empty. The only files in it are .gitattributes and .gitignore. The whole idea here is that I want to share this project with other people.
Help out a git newbie and explain how I get the entire solution into git?
Thanks!
As you already have the remote repository at GitHub, you should use the clone option first to clone your repository locally.
This will create a folder (your repository clone) on the default location containing those two files.
Then you can copy your project files to this folder and try to sync again.
I just installed eGit plugin and I'm playing around with it. I'm new to Git.
I've noticed something strange:
I committed sample project "Planets" then I modified one file only Planet.java.
Then I looked in the Git repository folder, and this modified file Planet.java is there, but none of my other source files are.
Does this mean if I delete my original project folder from the disk, it will break Git? I mean will I not be able to restore any previous committed version of this project anymore?
The "original project folder" is your Git repository. Git only exists* within the directory where you performed a git init. Its metadata about your files is stored within a hidden .git directory inside your project directory. If you delete your project directory, you're deleting your local copy of the Git repository.
*Assuming you haven't explicitly cloned your repository