GIT Commit to FTP Site
I am working on a project where I only have FTP control of the server. I am basically hand deploying changes from GIT commits to the server.
Is there any way to automate this (without writing the script myself, which I'm about to do), without being able to install git on the server?
ftp git
add a comment |
I am working on a project where I only have FTP control of the server. I am basically hand deploying changes from GIT commits to the server.
Is there any way to automate this (without writing the script myself, which I'm about to do), without being able to install git on the server?
ftp git
You could also push into a local bare repo, and then sync it up on the fs level with any ftpsync tool. It is not an okay solution if the repo on the ftp is used by multiple people.
– peterh
Jan 30 at 2:21
add a comment |
I am working on a project where I only have FTP control of the server. I am basically hand deploying changes from GIT commits to the server.
Is there any way to automate this (without writing the script myself, which I'm about to do), without being able to install git on the server?
ftp git
I am working on a project where I only have FTP control of the server. I am basically hand deploying changes from GIT commits to the server.
Is there any way to automate this (without writing the script myself, which I'm about to do), without being able to install git on the server?
ftp git
ftp git
asked Jul 14 '11 at 17:21
Dan RosenstarkDan Rosenstark
3,668114884
3,668114884
You could also push into a local bare repo, and then sync it up on the fs level with any ftpsync tool. It is not an okay solution if the repo on the ftp is used by multiple people.
– peterh
Jan 30 at 2:21
add a comment |
You could also push into a local bare repo, and then sync it up on the fs level with any ftpsync tool. It is not an okay solution if the repo on the ftp is used by multiple people.
– peterh
Jan 30 at 2:21
You could also push into a local bare repo, and then sync it up on the fs level with any ftpsync tool. It is not an okay solution if the repo on the ftp is used by multiple people.
– peterh
Jan 30 at 2:21
You could also push into a local bare repo, and then sync it up on the fs level with any ftpsync tool. It is not an okay solution if the repo on the ftp is used by multiple people.
– peterh
Jan 30 at 2:21
add a comment |
2 Answers
2
active
oldest
votes
I think what you need is git-ftp. I never tried it, anyway.
Thanks, David, that looks quite awesome. I'll check it out.
– Dan Rosenstark
Jul 14 '11 at 18:05
return if it fixed your problem
– kokbira
Jul 14 '11 at 18:17
add a comment |
While I was waiting for answers, I cooked this up. Though now I"ll have to check out git-ftp as David Costa suggests. This script doesn't actually do anything: it just gives you commands for your own FTPing.
#!/usr/bin/env ruby
if __FILE__ == $0
puts "Pulls file list between two git commits and makes ftp commands"
if ARGV.length != 2
puts "Sorry, include two hashes as arguments separated by spaces"
exit
end
hash1 = ARGV[0]
hash2 = ARGV[1]
command = "git log #{hash1}..#{hash2} --name-status --pretty="%p""
results = `#{command}`
results = results.to_a[2..-1].join
lines = results.to_a
lines.each do |line|
modifyAddDelete = line[0..0]
if (modifyAddDelete=="M" || modifyAddDelete=="A")
command = "put"
elsif (modifyAddDelete = "D")
command = "delete"
end
filename = line[2..1000]
puts "#{command} #{filename}"
end
end
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f310575%2fgit-commit-to-ftp-site%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I think what you need is git-ftp. I never tried it, anyway.
Thanks, David, that looks quite awesome. I'll check it out.
– Dan Rosenstark
Jul 14 '11 at 18:05
return if it fixed your problem
– kokbira
Jul 14 '11 at 18:17
add a comment |
I think what you need is git-ftp. I never tried it, anyway.
Thanks, David, that looks quite awesome. I'll check it out.
– Dan Rosenstark
Jul 14 '11 at 18:05
return if it fixed your problem
– kokbira
Jul 14 '11 at 18:17
add a comment |
I think what you need is git-ftp. I never tried it, anyway.
I think what you need is git-ftp. I never tried it, anyway.
edited Jan 30 at 9:43
answered Jul 14 '11 at 17:28
David CostaDavid Costa
70149
70149
Thanks, David, that looks quite awesome. I'll check it out.
– Dan Rosenstark
Jul 14 '11 at 18:05
return if it fixed your problem
– kokbira
Jul 14 '11 at 18:17
add a comment |
Thanks, David, that looks quite awesome. I'll check it out.
– Dan Rosenstark
Jul 14 '11 at 18:05
return if it fixed your problem
– kokbira
Jul 14 '11 at 18:17
Thanks, David, that looks quite awesome. I'll check it out.
– Dan Rosenstark
Jul 14 '11 at 18:05
Thanks, David, that looks quite awesome. I'll check it out.
– Dan Rosenstark
Jul 14 '11 at 18:05
return if it fixed your problem
– kokbira
Jul 14 '11 at 18:17
return if it fixed your problem
– kokbira
Jul 14 '11 at 18:17
add a comment |
While I was waiting for answers, I cooked this up. Though now I"ll have to check out git-ftp as David Costa suggests. This script doesn't actually do anything: it just gives you commands for your own FTPing.
#!/usr/bin/env ruby
if __FILE__ == $0
puts "Pulls file list between two git commits and makes ftp commands"
if ARGV.length != 2
puts "Sorry, include two hashes as arguments separated by spaces"
exit
end
hash1 = ARGV[0]
hash2 = ARGV[1]
command = "git log #{hash1}..#{hash2} --name-status --pretty="%p""
results = `#{command}`
results = results.to_a[2..-1].join
lines = results.to_a
lines.each do |line|
modifyAddDelete = line[0..0]
if (modifyAddDelete=="M" || modifyAddDelete=="A")
command = "put"
elsif (modifyAddDelete = "D")
command = "delete"
end
filename = line[2..1000]
puts "#{command} #{filename}"
end
end
add a comment |
While I was waiting for answers, I cooked this up. Though now I"ll have to check out git-ftp as David Costa suggests. This script doesn't actually do anything: it just gives you commands for your own FTPing.
#!/usr/bin/env ruby
if __FILE__ == $0
puts "Pulls file list between two git commits and makes ftp commands"
if ARGV.length != 2
puts "Sorry, include two hashes as arguments separated by spaces"
exit
end
hash1 = ARGV[0]
hash2 = ARGV[1]
command = "git log #{hash1}..#{hash2} --name-status --pretty="%p""
results = `#{command}`
results = results.to_a[2..-1].join
lines = results.to_a
lines.each do |line|
modifyAddDelete = line[0..0]
if (modifyAddDelete=="M" || modifyAddDelete=="A")
command = "put"
elsif (modifyAddDelete = "D")
command = "delete"
end
filename = line[2..1000]
puts "#{command} #{filename}"
end
end
add a comment |
While I was waiting for answers, I cooked this up. Though now I"ll have to check out git-ftp as David Costa suggests. This script doesn't actually do anything: it just gives you commands for your own FTPing.
#!/usr/bin/env ruby
if __FILE__ == $0
puts "Pulls file list between two git commits and makes ftp commands"
if ARGV.length != 2
puts "Sorry, include two hashes as arguments separated by spaces"
exit
end
hash1 = ARGV[0]
hash2 = ARGV[1]
command = "git log #{hash1}..#{hash2} --name-status --pretty="%p""
results = `#{command}`
results = results.to_a[2..-1].join
lines = results.to_a
lines.each do |line|
modifyAddDelete = line[0..0]
if (modifyAddDelete=="M" || modifyAddDelete=="A")
command = "put"
elsif (modifyAddDelete = "D")
command = "delete"
end
filename = line[2..1000]
puts "#{command} #{filename}"
end
end
While I was waiting for answers, I cooked this up. Though now I"ll have to check out git-ftp as David Costa suggests. This script doesn't actually do anything: it just gives you commands for your own FTPing.
#!/usr/bin/env ruby
if __FILE__ == $0
puts "Pulls file list between two git commits and makes ftp commands"
if ARGV.length != 2
puts "Sorry, include two hashes as arguments separated by spaces"
exit
end
hash1 = ARGV[0]
hash2 = ARGV[1]
command = "git log #{hash1}..#{hash2} --name-status --pretty="%p""
results = `#{command}`
results = results.to_a[2..-1].join
lines = results.to_a
lines.each do |line|
modifyAddDelete = line[0..0]
if (modifyAddDelete=="M" || modifyAddDelete=="A")
command = "put"
elsif (modifyAddDelete = "D")
command = "delete"
end
filename = line[2..1000]
puts "#{command} #{filename}"
end
end
answered Jul 14 '11 at 18:04
Dan RosenstarkDan Rosenstark
3,668114884
3,668114884
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f310575%2fgit-commit-to-ftp-site%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You could also push into a local bare repo, and then sync it up on the fs level with any ftpsync tool. It is not an okay solution if the repo on the ftp is used by multiple people.
– peterh
Jan 30 at 2:21