Merge local files than pushing to git

So, I have a cloned repo on my machine.(folder A). And I have another folder in which my files are updated, but it is not a git repo.(folder B). I would like to merge all files and folders from folder B with folder A (which is my cloned repo).
The rest is easy, just git add, git commit and git push.
Thanks!

  • Composer - SensioDistributionBundle asking for a password
  • When searching Git diffs for a term, can I only show the line the term is on?
  • Can git checkout to remote branch without pulling files?
  • Unable to install Git-core+svn by MacPorts
  • When you `git show` on a merge commit, what does the diff mean?
  • netbean git plugin issue on pulling/reverting and commiting
  • Why github allows unrecognized author to commit
  • github badges and branches
  • Git: Managing Branches
  • Git / Rails / Shared Hosting (Dreamhost) workflow
  • Is fork a git core concept?
  • Apply github commit / pull request as a patch
  • One Solution collect form web for “Merge local files than pushing to git”

    I do it like this

    aa=/path/to/folder-a
    bb=/path/to/folder-b
    
    cd $aa
    git rm -qr .
    cp -r $bb/. .
    git add -A
    git commit
    git push
    

    ref

    Git Baby is a git and github fan, let's start git clone.