I have a question about GIT and RSYNC because I use these two commands for make a deploy but I want upload my files to a FTP server (production) of the files that I have in my master branch only!! (This is my problem).
Example:
Then...
I put the followings commands in "MyBranch":
git add .
git commit -m "My changes"
git checkout master
git merge MyBranch
git pull origin master
and then I make a rsync to a FTP Server.
I want make add and commit my changes in my branch for then switch to a master branch and make the pull for get the changes of my team and then realize the deploy.
In other words, I want upload to FTP only the files in the master branch!!! Is this Possible??
Thank's
You can just do :
git add .
git commit -m "My changes"
git checkout master
git pull origin master
Then you can do your rsync upload to your server. It will contain the most recent version of 'master' ie master with your team changes.
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.