I am trying to push a build to Git and I do the folowing:
git init
git add .
git commit -m "initial commit"
And then I get the message:
nothing to commit, working tree clean
I checked the ignored on git and added the build file.
What am I doing wrong?
CodePudding user response:
After making changes to .gitignore
file, do the following
git rm -r --cached .
git add .
git commit -m ".gitignore updated"
Then you can push git push
or git push --force
CodePudding user response:
After committing the changes you have to use one more command to push the changes.
i.e git push -u origin {Branch}
For more details:https://www.atlassian.com/git/tutorials/syncing/git-push