How to Remove a File From Git Commit

104 5
    • 1). Open a command line program and navigate to the folder where the commit change was made. For example, "cd /var/httpd" would open the "httpd" folder in the "var" directory.

    • 2). Type "git revert HEAD" where "HEAD" is the main branch before the faulty commit.

    • 3). Type "git commit CHANGE" where "CHANGE" is the corrected file that should have been committed earlier.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.