Change git root folder

I have used the Github desktop application to manage my Github repository. I have the following folder structure:

myRepo/
    config/
    mappings/
    src/
    bin/
    eclipse/
    lib/
    README.md
    LICENSE.md

How would I go about making src the main folder of my repository so it will only commit files inside src while retaining the files README.md and LICENSE.md while still having the files inside src inside the src folder, like this:

  • Splitting a repository with the possibility to later pull changes
  • How to control which github commits to build for in CircleCI?
  • Git total reset. Remove all files. Remove history
  • Git: tell a remote repository to check itself out locally
  • Ansible sudo_user not using the correct $HOME directory
  • Git: Show content of file as it will look like after committing
  • Thanks in advance.

  • Track someone's GitHub repo in a branch
  • Identify merge into master
  • recover lost unversioned files after git clean -d -f
  • Git: want to iterate through all commits on branch, and list files in each commit
  • How do I edit the commit message of any commit in git?
  • „Floating“ commit in git
  • One Solution collect form web for “Change git root folder”

    Maybe you should ignore folder other than src.

    .gitignore

    ### project ###
    config
    mappings
    bin
    eclipse
    lib
    
    ### Eclipse ###
    .project
    .metadata
    .classpath
    .settings/
    

    Read more:

    Use tools:

    Git Baby is a git and github fan, let's start git clone.