Can I change a code in github that my collaborator does not understand?
I'm not entirely sure what you mean. Could you please provode some context and elaborate?
Like I have shared my code with a collaborator. Can I change the code a little and commit, but I do not want my collaborator understand?
You mean, you don't want your collaborator to know that you've made changes to code that you're collaborating on?