![]() This can happen if you copy another git repository into your repository and then just use git add to stage it, rather than adding it with git submodule add. Update: It seems from the error message that you've quoted in the comments below that you have added these other git repositories directly rather than as submodules. Then only commit these new submodule versions in the main project when you have tested that the project as a whole works with those new versions of each submodule. You should carefully change into each submodule in turn, and consider how you want to update them, treating each as a standalone repository. (If you don't have other submodules nested inside those submodules, the -recursive option is unnecessary.) Īnd then you could create a commit in every submodule with: git submodule foreach -recursive "git commit -m 'Committing in a submodule'" in each submodule, you could do: git submodule foreach -recursive git add -A. If what you want to do is to run git add -A. The problem here is that BankAccount, BuckysButtons, multiview, rotator and segmentedControls are all git submodules, which act like independent repositories in many ways. You can see that there has been no change in the git status. Then I put git add -A: Rakib-MacBook-Pro:my-xcode-practice rakib$ git add -AĪnd then here is the new status AFTER doing git add -A: Rakib-MacBook-Pro:my-xcode-practice rakib$ git status No changes added to commit (use "git add" and/or "git commit -a") # modified: segmentedControls (modified content, untracked content) # modified: rotator (modified content, untracked content) ![]() # modified: multiview (modified content, untracked content) # modified: BuckysButtons (modified content, untracked content) ![]() # modified: BankAccount (modified content, untracked content) # (commit or discard the untracked or modified content in submodules) " to discard changes in working directory) Here is my initial git status in my project: Rakib-MacBook-Pro:my-xcode-practice rakib$ git status I tried git add -A but it is NOT adding modified files inside folders. Push the changes in your local repository to want to add all files no matter what: whether it is deleted, created, modified, untracked, etc? I just don't want to git add ALL my files EVERY TIME. To remove this commit and modify the file, use 'git reset -soft HEAD~1' and commit and add the file again. # Commits the tracked changes and prepares them to be pushed to a remote repository. To unstage a file, use 'git reset HEAD YOUR-FILE'.Ĭommit the file that you've staged in your local repository. # Adds the file to your local repository and stages it for commit. Stage the file for commit to your local repository. On your computer, move the file you'd like to upload to GitHub into the local directory that was created when you cloned the repository.Ĭhange the current working directory to your local repository. Sensitive information can include, but is not limited to:įor more information, see " Removing sensitive data from a repository." Warning: Never git add, commit, or push sensitive information to a remote repository. You can upload an existing file to a repository on using the command line. For more information, see " Creating a pull request."Īdding a file to a repository using the command line If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request. For more information, see " Creating a commit with multiple authors."īelow the commit message fields, decide whether to add your commit to the current branch or to a new branch. You can attribute the commit to more than one author in the commit message. ![]() In the "Commit message" field, type a short, meaningful commit message that describes the change you made to the file. To select the files you want to upload, drag and drop the file or folder, or click choose your files. Alternatively, you can drag and drop files into your browser. On, navigate to the main page of the repository.Ībove the list of files, select the Add file dropdown menu and click Upload files. For more information, see " Committing and reviewing changes to your project in GitHub Desktop." ![]() You can use GitHub Desktop to move your changes to a new branch and commit them. For more information, see " About protected branches." Also see: Difference of git add -A and git add. If you want to stage files under the current path of your working tree, you need to use: git add -A.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |