이리저리 짜깁기 한 코드를 깃헙에 띄우려고 리포 파고 리모트 설정해서 날리려는데

정방향이 불가능하므로, 중지합니다.

라는 에러가 떴다. 검색해도 딱히 유용한 게 없고, 난감하려는 찰나에 영어 원문 을 발견했다.

Not possible to fast-forward, aborting.

Fast-forward가 어떻게 정방향 으로 해석되는지는 차치하고, 해결법을 검색해보았다.

git pull --rebase

그러니까 git pull 을 하려면 현재 로컬 디렉터리에 있는 모든 내용이 리모트 디렉터리에도 있어야 하는데 그렇지 못하니까 Fast-forward가 안 된다는 거였다. Stackoverflow

Your branch is no longer directly based off of the branch you're trying to merge it into - e.g. another commit was added to the destination branch that isn't in your branch. Thus, you can't fast-forward into it (because fast-forward requires your branch to completely contain the destination branch).

You can rebase your branch on top of the destination branch (git rebase <destination branch>) to rework the commits such that they will fast forward into it, or you can do a regular merge.