Resolve Git history conflicts when linking an existing local C++ project to a new GitHub repository by initializing locally first.