Stripping a git repo of all committed files that should have been ignored

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I recently initiated a git repo and forgot to add a .gitignore file. After my initial commit, my repo has many subdirectories and many files that should have been ignored. Is there an efficient way to add a .gitignore and then push the repo without the files meant to be ignored to a tool like GitLab or GitHub?
git github gitlab
add a comment |Â
up vote
0
down vote
favorite
I recently initiated a git repo and forgot to add a .gitignore file. After my initial commit, my repo has many subdirectories and many files that should have been ignored. Is there an efficient way to add a .gitignore and then push the repo without the files meant to be ignored to a tool like GitLab or GitHub?
git github gitlab
Have the files that should be ignored been committed?
â Stephen Kitt
16 mins ago
Yes. I realized that I was missing my gitignore file after I committed.
â Brian Fitzpatrick
14 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I recently initiated a git repo and forgot to add a .gitignore file. After my initial commit, my repo has many subdirectories and many files that should have been ignored. Is there an efficient way to add a .gitignore and then push the repo without the files meant to be ignored to a tool like GitLab or GitHub?
git github gitlab
I recently initiated a git repo and forgot to add a .gitignore file. After my initial commit, my repo has many subdirectories and many files that should have been ignored. Is there an efficient way to add a .gitignore and then push the repo without the files meant to be ignored to a tool like GitLab or GitHub?
git github gitlab
git github gitlab
edited 10 mins ago
asked 40 mins ago
Brian Fitzpatrick
7541922
7541922
Have the files that should be ignored been committed?
â Stephen Kitt
16 mins ago
Yes. I realized that I was missing my gitignore file after I committed.
â Brian Fitzpatrick
14 mins ago
add a comment |Â
Have the files that should be ignored been committed?
â Stephen Kitt
16 mins ago
Yes. I realized that I was missing my gitignore file after I committed.
â Brian Fitzpatrick
14 mins ago
Have the files that should be ignored been committed?
â Stephen Kitt
16 mins ago
Have the files that should be ignored been committed?
â Stephen Kitt
16 mins ago
Yes. I realized that I was missing my gitignore file after I committed.
â Brian Fitzpatrick
14 mins ago
Yes. I realized that I was missing my gitignore file after I committed.
â Brian Fitzpatrick
14 mins ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478507%2fstripping-a-git-repo-of-all-committed-files-that-should-have-been-ignored%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Have the files that should be ignored been committed?
â Stephen Kitt
16 mins ago
Yes. I realized that I was missing my gitignore file after I committed.
â Brian Fitzpatrick
14 mins ago