Git add files from ignored folder as if they were in root

I have an app living in develop branch and bundled using webpack into dist/ folder. I also have gh-pages detached branch.

I want to take files from dist/ in develop and add them to gh-pages as if those files were in root. The goal is I want builded app to be uploaded to GitHub pages.

  • Using -m during add, commit and push alias
  • Heroku push rejected, Submodule install failed
  • Error with changeSet in jenkins pipeline (Error:java.io.NotSerializableException: hudson.plugins.git.GitChangeSetList)
  • Extracting subdirectory from a git repo into another repo and keeping dir structure?
  • Git Aptana integration in remote file explorer
  • Netbeans 7 vs Eclipse 3.6 for Java, git and vim
  • dist/ folder is in .gitignore file

    I tried something like git add -f dist/ :/, however this will add all ignored files.

    Therefore the question is how do I add and commit files from ignored dist/ folder as if those files were in project root?

    Thanks

  • Git/Github allow collaborators but keep control
  • How do I git log with short commit hash + date/time?
  • Get Git repository's last commit
  • git/ftp workflow logic
  • Writing a git hook to automatically modify code during local commits
  • What is Bower private repository? How do i create my own private Bower repository?
  • Git Baby is a git and github fan, let's start git clone.