Why did my client folder is not being pushed to github - github

This is driving me crazy, i know this sounds like a dumb question but i have been struggling with this for like 2 days.
I just finished coding on my Visual Code , and i wanted to push it on github. So i created a new repository named mern-maps , below i show you guys my folder structure
this is how i tried to push my project to newly created repository
BUT , when i checked on my github , my client folder is not showing anything, it even has the commit messages that i created 2 weeks ago.
What is wrong with my project ? how can i push all of them ? it is okay if i need to create a new repo or something . Thank you for your time!

So you need to delete the git folder from the client and then go out of the clien and create a new git folder starting with git init. In order to see the git if you are on vscode,go to your settings and write files.exclude, when you see the git just delete it as hidden option and you will see it in folder as default.Delete it from the client folder and as l told you go out of client and create the new git folder.

Enable hidden folder option and delete .git folder inside client folder.
and again open the terminal from server root folder and type:
git init

Related

How to upload foders using Github desktop

I'm very new to Github and I'm trying to create a new repository that contains 2 folders ("server" and "utalk").
The "utalk" folder is my front-end and the "server" folder is my backend.
But when I use Github Desktop, it seems I only push the server folder and cant push the utalk folder.
I don't know how to push all my folders.
my Project Folder:
my GitHub repository:
First, in your file explorer, enable View hidden files
Then check if you see a .git in the utalk folder. That would make it a nested git repository, mostly ignored by your parent folder.
Switch to command-line and do a git status in utalk-project to know more about your current situation.

Eclipse, Egit, Github: remove pushed project folder

I have successfully created a git hub repository, a local master, committed the initial changes and pushed them to github.
Unfortunately the project folder from Eclipse ends up in the repository. For example:
<username>/<gitrepositoryname>/<eclipse project folder>/<project files & README>
when for most people it looks like:
<username>/<gitrepositoryname>/<project files & README>
I created a new local master after I found this tutorial Push eclipse project to GitHub with EGit
but now I am running into push problems such as "HEAD rejected - non-fast-forward" when using the new local master.
Can some please help me to correct this locally/remotely? Is there a way to switch local master branches so that I can sync the correct one with githib?
Thanks in advance.
It's pretty simple to fix:
Go to the "workspace" where you keep <eclipse project folder>
Make sure to delete the .git folder there
Tell git to force push the changes. (Checkbox) (It's usually not good to force git to do something, because you could loose commits/data BUT here, we really want to overwrite the old repository with the new one.)
Your changes should be up immediately. Next time you push, please make sure, the force push checkbox is disabled again

Publishing to github results in an empty 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.

How to get src folder under project-root folder in github when staging from eclipse using egit

Current scenario :
In Eclipse when we create a project, say a PyDev project named ‘SimpleGit’, the folder structure created by eclipse will be like
EclipseWorkingDirectory/SimpleGit/src/
correct?
If we add this to git using Egit, by right clicking on the project folder SimpleGit then Team>Share, The folder structure in which repo is formed like this
Parent Folder/ SimpleGit/ .git
Parent Folder/ SimpleGit/SimpleGit/src/
And when we stage it to remote github everything will come under
Username/ SimpleGit / SimpleGit / src /
So when we look in GitHub in the root project folder (Username/ SimpleGit) we can’t see the source folder. It will be under another folder ‘SimpleGit’. How we can avoid this?
What I want is , I want to get my source forlder(src) listed under the Project Root directory, when staging from an already built project in eclipse using egit. How do I do this?
I want like this:
https://github.com/nicholasbishop/blender
Not like this:
https://github.com/afilash/SimpleGit
it cannot be done using eGit - it assumes the Eclipse project structure.
But it can be accomplished by using git itself. Just create a repository under SimpleGit folder executing 'git init'. From that point on you'd have to manage your git repository by either git itself (command line) or some other UI. SourceTree works really well for me.
It is a bit late, I know, but this method perfectly works and I hope it is useful for anyone who sees this post from now on.
The procedure is the following:
First step is creating a repository on Github (through github.com)
Move to Eclipse IDE (Git Repositories view) and click "Clone a Git Repository and add the clone to this view". Doing that the project will be somewhere located on the hard disk. Usually, it is stored in C:\Users\username\git\projectName but you are able to change it. This is our local repository.
Once done, press (in Eclipse IDE) File->Import->Projects from Git->Existing local repository(Select the one you cloned before)->Import using the new project wizard->Finish->Java->Java Project->Specify project name (just below the dialog box there is a checked checkbox that says use default location, uncheck it. Here is where you have to specify the directory you chose while cloning the repository previously).->Next->Finish
It should be enough for creating the right directory structure.

Moving original directory in GitHub

I created an original GitHub repository and committed all my code. I would like to move this directory now into a new directory (not in the repo root directory). I am a bit confused how to tackle this (been through Git Help and threads here).
I'm a bit of a GitHub / Terminal newb :-)
This is what I am trying to do:
Projects -> github_project
Projects -> Directory -> github_project
thanks!
Create a new directory in your repo's root.
Move all other files into that directory (using git mv).
Push to GitHub.
Update to address edited question
If you just want to put it in a new directory, then create the new directory and move the repository there.