Remove Locally Deleted or Renamed Files and Directories from Remote Github Repo?









up vote
1
down vote

favorite
1












I'm working on a project where I'm running a server on my local machine, developing the code on my local machine, and then committing my changes to a repo on Github.com via the Github Desktop app. As I develop, I'm at times reorganizing things - renaming directories, changing filenames, deleting files, etc.



Recently I noticed that when I make these kinds of changes, the old files and directories persist in the repo on Github.com, which makes for a fair amount of messiness.



I've looked for options in the desktop app and on Github.com to change this behavior - ie, make it so that locally deleted files and directories are deleted in the online repo as well, but can find nothing. I don't want to manually delete obsolete content on Github.com, or delete the repo contents entirely and start over if I don't have to.



Insight would be greatly appreciated.



Thanks.










share|improve this question





















  • Are u asking how to rename files in git?
    – CodeWizard
    Nov 10 at 0:18










  • Not exactly. I guess to clarify that, I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit." I'm NOT asking how to rename files manually at the moment as I'm hoping there's an answer here that implicitly makes it unnecessary to do so.
    – Mark Scott Lavin
    Nov 10 at 1:03














up vote
1
down vote

favorite
1












I'm working on a project where I'm running a server on my local machine, developing the code on my local machine, and then committing my changes to a repo on Github.com via the Github Desktop app. As I develop, I'm at times reorganizing things - renaming directories, changing filenames, deleting files, etc.



Recently I noticed that when I make these kinds of changes, the old files and directories persist in the repo on Github.com, which makes for a fair amount of messiness.



I've looked for options in the desktop app and on Github.com to change this behavior - ie, make it so that locally deleted files and directories are deleted in the online repo as well, but can find nothing. I don't want to manually delete obsolete content on Github.com, or delete the repo contents entirely and start over if I don't have to.



Insight would be greatly appreciated.



Thanks.










share|improve this question





















  • Are u asking how to rename files in git?
    – CodeWizard
    Nov 10 at 0:18










  • Not exactly. I guess to clarify that, I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit." I'm NOT asking how to rename files manually at the moment as I'm hoping there's an answer here that implicitly makes it unnecessary to do so.
    – Mark Scott Lavin
    Nov 10 at 1:03












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I'm working on a project where I'm running a server on my local machine, developing the code on my local machine, and then committing my changes to a repo on Github.com via the Github Desktop app. As I develop, I'm at times reorganizing things - renaming directories, changing filenames, deleting files, etc.



Recently I noticed that when I make these kinds of changes, the old files and directories persist in the repo on Github.com, which makes for a fair amount of messiness.



I've looked for options in the desktop app and on Github.com to change this behavior - ie, make it so that locally deleted files and directories are deleted in the online repo as well, but can find nothing. I don't want to manually delete obsolete content on Github.com, or delete the repo contents entirely and start over if I don't have to.



Insight would be greatly appreciated.



Thanks.










share|improve this question













I'm working on a project where I'm running a server on my local machine, developing the code on my local machine, and then committing my changes to a repo on Github.com via the Github Desktop app. As I develop, I'm at times reorganizing things - renaming directories, changing filenames, deleting files, etc.



Recently I noticed that when I make these kinds of changes, the old files and directories persist in the repo on Github.com, which makes for a fair amount of messiness.



I've looked for options in the desktop app and on Github.com to change this behavior - ie, make it so that locally deleted files and directories are deleted in the online repo as well, but can find nothing. I don't want to manually delete obsolete content on Github.com, or delete the repo contents entirely and start over if I don't have to.



Insight would be greatly appreciated.



Thanks.







git github repository






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 9 at 23:44









Mark Scott Lavin

528




528











  • Are u asking how to rename files in git?
    – CodeWizard
    Nov 10 at 0:18










  • Not exactly. I guess to clarify that, I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit." I'm NOT asking how to rename files manually at the moment as I'm hoping there's an answer here that implicitly makes it unnecessary to do so.
    – Mark Scott Lavin
    Nov 10 at 1:03
















  • Are u asking how to rename files in git?
    – CodeWizard
    Nov 10 at 0:18










  • Not exactly. I guess to clarify that, I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit." I'm NOT asking how to rename files manually at the moment as I'm hoping there's an answer here that implicitly makes it unnecessary to do so.
    – Mark Scott Lavin
    Nov 10 at 1:03















Are u asking how to rename files in git?
– CodeWizard
Nov 10 at 0:18




Are u asking how to rename files in git?
– CodeWizard
Nov 10 at 0:18












Not exactly. I guess to clarify that, I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit." I'm NOT asking how to rename files manually at the moment as I'm hoping there's an answer here that implicitly makes it unnecessary to do so.
– Mark Scott Lavin
Nov 10 at 1:03




Not exactly. I guess to clarify that, I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit." I'm NOT asking how to rename files manually at the moment as I'm hoping there's an answer here that implicitly makes it unnecessary to do so.
– Mark Scott Lavin
Nov 10 at 1:03












1 Answer
1






active

oldest

votes

















up vote
0
down vote














I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit."




No: it won't touch the remote side.

Not until you are pushing your local commits to the remote, in which case the deletion recorded locally will be reported remotely.

But before that git push, nothing changes on the remote repo.






share|improve this answer




















  • Ok, thanks, but this doesn't really clarify anything for me. Because "the deletion recorded locally will be reported remotely" when I push my local commits to the remote. That means that when I push to the remote, locally deleted files should be reported there... right? But that's what's not happening. The deleted files are still there in the remote. And when I rename a directory and do a push, the renamed directory is there, along with the directory with the old name, which should be being deleted.
    – Mark Scott Lavin
    Nov 10 at 1:39










  • @MarkScottLavin "But that's what's not happening. The deleted files are still there in the remote." That would be the case if you have added those files as new, without removing the old ones. Like with a wrong command of git add (stackoverflow.com/a/43199993/6309)
    – VonC
    Nov 11 at 2:24










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53234676%2fremove-locally-deleted-or-renamed-files-and-directories-from-remote-github-repo%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote














I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit."




No: it won't touch the remote side.

Not until you are pushing your local commits to the remote, in which case the deletion recorded locally will be reported remotely.

But before that git push, nothing changes on the remote repo.






share|improve this answer




















  • Ok, thanks, but this doesn't really clarify anything for me. Because "the deletion recorded locally will be reported remotely" when I push my local commits to the remote. That means that when I push to the remote, locally deleted files should be reported there... right? But that's what's not happening. The deleted files are still there in the remote. And when I rename a directory and do a push, the renamed directory is there, along with the directory with the old name, which should be being deleted.
    – Mark Scott Lavin
    Nov 10 at 1:39










  • @MarkScottLavin "But that's what's not happening. The deleted files are still there in the remote." That would be the case if you have added those files as new, without removing the old ones. Like with a wrong command of git add (stackoverflow.com/a/43199993/6309)
    – VonC
    Nov 11 at 2:24














up vote
0
down vote














I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit."




No: it won't touch the remote side.

Not until you are pushing your local commits to the remote, in which case the deletion recorded locally will be reported remotely.

But before that git push, nothing changes on the remote repo.






share|improve this answer




















  • Ok, thanks, but this doesn't really clarify anything for me. Because "the deletion recorded locally will be reported remotely" when I push my local commits to the remote. That means that when I push to the remote, locally deleted files should be reported there... right? But that's what's not happening. The deleted files are still there in the remote. And when I rename a directory and do a push, the renamed directory is there, along with the directory with the old name, which should be being deleted.
    – Mark Scott Lavin
    Nov 10 at 1:39










  • @MarkScottLavin "But that's what's not happening. The deleted files are still there in the remote." That would be the case if you have added those files as new, without removing the old ones. Like with a wrong command of git add (stackoverflow.com/a/43199993/6309)
    – VonC
    Nov 11 at 2:24












up vote
0
down vote










up vote
0
down vote










I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit."




No: it won't touch the remote side.

Not until you are pushing your local commits to the remote, in which case the deletion recorded locally will be reported remotely.

But before that git push, nothing changes on the remote repo.






share|improve this answer













I've been assuming that if I rename a file or directory, that the Github Desktop app sees that as a change - at the very least as a "this file was removed and that one was added" scenario, so "let's remove this file and add that file to the repo on remote commit."




No: it won't touch the remote side.

Not until you are pushing your local commits to the remote, in which case the deletion recorded locally will be reported remotely.

But before that git push, nothing changes on the remote repo.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 10 at 1:05









VonC

822k28425813100




822k28425813100











  • Ok, thanks, but this doesn't really clarify anything for me. Because "the deletion recorded locally will be reported remotely" when I push my local commits to the remote. That means that when I push to the remote, locally deleted files should be reported there... right? But that's what's not happening. The deleted files are still there in the remote. And when I rename a directory and do a push, the renamed directory is there, along with the directory with the old name, which should be being deleted.
    – Mark Scott Lavin
    Nov 10 at 1:39










  • @MarkScottLavin "But that's what's not happening. The deleted files are still there in the remote." That would be the case if you have added those files as new, without removing the old ones. Like with a wrong command of git add (stackoverflow.com/a/43199993/6309)
    – VonC
    Nov 11 at 2:24
















  • Ok, thanks, but this doesn't really clarify anything for me. Because "the deletion recorded locally will be reported remotely" when I push my local commits to the remote. That means that when I push to the remote, locally deleted files should be reported there... right? But that's what's not happening. The deleted files are still there in the remote. And when I rename a directory and do a push, the renamed directory is there, along with the directory with the old name, which should be being deleted.
    – Mark Scott Lavin
    Nov 10 at 1:39










  • @MarkScottLavin "But that's what's not happening. The deleted files are still there in the remote." That would be the case if you have added those files as new, without removing the old ones. Like with a wrong command of git add (stackoverflow.com/a/43199993/6309)
    – VonC
    Nov 11 at 2:24















Ok, thanks, but this doesn't really clarify anything for me. Because "the deletion recorded locally will be reported remotely" when I push my local commits to the remote. That means that when I push to the remote, locally deleted files should be reported there... right? But that's what's not happening. The deleted files are still there in the remote. And when I rename a directory and do a push, the renamed directory is there, along with the directory with the old name, which should be being deleted.
– Mark Scott Lavin
Nov 10 at 1:39




Ok, thanks, but this doesn't really clarify anything for me. Because "the deletion recorded locally will be reported remotely" when I push my local commits to the remote. That means that when I push to the remote, locally deleted files should be reported there... right? But that's what's not happening. The deleted files are still there in the remote. And when I rename a directory and do a push, the renamed directory is there, along with the directory with the old name, which should be being deleted.
– Mark Scott Lavin
Nov 10 at 1:39












@MarkScottLavin "But that's what's not happening. The deleted files are still there in the remote." That would be the case if you have added those files as new, without removing the old ones. Like with a wrong command of git add (stackoverflow.com/a/43199993/6309)
– VonC
Nov 11 at 2:24




@MarkScottLavin "But that's what's not happening. The deleted files are still there in the remote." That would be the case if you have added those files as new, without removing the old ones. Like with a wrong command of git add (stackoverflow.com/a/43199993/6309)
– VonC
Nov 11 at 2:24

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53234676%2fremove-locally-deleted-or-renamed-files-and-directories-from-remote-github-repo%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo