Remove Locally Deleted or Renamed Files and Directories from Remote Github Repo?
up vote
1
down vote
favorite
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
add a comment |
up vote
1
down vote
favorite
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
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
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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
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
git github repository
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
add a comment |
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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