Help a beginner to add existing files and a folder to repository #109355
-
Hello I have a folder tree "D:/test/src" In this "/src" folder i have 2 files "App.jsx" and "main.jsx". They must be in this folder, in order for the application to work. How can i create a repository to monitor these two files, and the whole "/src" folder? I use github desktop. If i try to select the /src folder, it creates a subfolder /src/src and that is not what is needed. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hello! 👋🏼 In the menu bar, navigate to File > Add Local Repository. Once you've selected the parent folder (D:/test), ensure to check the box next to "Include untracked files." Then, click "Choose." To ignore unnecessary files: Once you've provided a commit message, commit and push to the main branch. ;) Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Hello and thank you When i go to File > Add local repository and select D:/test folder, the program does not show a checkbox "include untracked files". Instead it immediatily says "This directory does not appear to be a Git repository. Would you like to "create a repository" here instead"? I am unable to do anything else than to press "create a repository" link. When i do that, a window opens and all i can do is a create a new repository. In the opening window if i enter "Name: src" and "Local path: D:/test/src" - the program will create a subfolder "D:/test/src/src" and it is wrong again. What to do? |
Beta Was this translation helpful? Give feedback.
-
To create a repository to monitor the 'App.jsx' and 'main.jsx' files along with the entire '/src' folder using GitHub Desktop, you can follow these steps:
Commit Changes:
Publish Repository:
Now, your repository should be set up to monitor the 'App.jsx' and 'main.jsx' files along with the entire '/src' folder. You can continue to make changes to these files locally and commit and push them to the repository using GitHub Desktop. |
Beta Was this translation helpful? Give feedback.
Ohh I see,
Now, in your terminal (command prompt):
Navigate to the directory where you want to initialise your local repository. For example:
cd D:/test/src
Initialize a Git repository in this directory:
git init
Stage your initial files and commit them:
Link you…