I have a local directory whose structure is something like :
Structure of my github repository is :
As it can be noticed, the github repository has some extra directories as well as some extra files in some directories. It may have some files missing as compared to local directory. So, I am looking for a way to push the changes of only those files which are already present in the repository. In other words, I want all other files/folders to be ignored. I don't want to add those new files/folders when I push. I only want the existing files to be synced.
I got this link which gives only suggests a way to ignore a folder. git to ignore a hidden directory in the local repo This doesn't solve my problem.
Please suggest how can I solve this problem. Thanks.
You could:
That way, you import in your GitHub repo only what your local repo has added/modified.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.