I commit a project on github using these steps :
Right click your project, select Team -> Share Project -> Git. Select the proposed line and press "Create repository". Press finish.
Right-mouse click on your project and select "Team" -> "Push". A dialog pops up. Maintain the following data. Adjust the hightlighted line so that you are using your user and your project name.
But when I view my project on github this is my project structure : myproject -> myproject -> src
When it should be : myproject -> src
So an extra level with the project name is being created on github. Am I commiting the project correctly ?
When I try to share the project with "Use or create repository in parent folder of project" enabled the project path is "c:\homedir\git\egit-test1\egit-test1" Should it not be "c:\homedir\git\egit-test1\" ?
Screenshot attached :
To add and commit files to a Git repository Create your new files or edit existing files in your local project directory. Enter git add --all at the command line prompt in your local project directory to add the files or changes to the repository. Enter git status to see the changes to be committed.
A Git repository tracks and saves the history of all changes made to the files in a Git project. It saves this data in a directory called . git , also known as the repository folder. Git uses a version control system to track all changes made to the project and save them in the repository.
If you don't want the additional directory level in your git repository, you need to enable the "Use or create repository in parent folder of project" option at the very top of the "Configure Git Repository" dialog (Team -> Share Project... -> Git).
However, this will create the repository directly in your workspace and not in the default repository folder, which is not recommended. But you can move the project to the right place and re-import it into your workspace in a second step.
Another option would be to create the repository on github first. Afterwards you can clone the github repository and move your code into it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With