Just enough GiT for Puppet Automation – Part7
+ summary of this article :
All Posts in this Series
- Just enough GiT for Puppet Automation – Part1
- Just enough GiT for Puppet Automation – Part2
- Just enough GiT for Puppet Automation – Part3
- Just enough GiT for Puppet Automation – Part4
- Just enough GiT for Puppet Automation – Part5
- Just enough GiT for Puppet Automation – Part6
- Just enough GiT for Puppet Automation – Part7
Pushing Local code changes to the master GiT repo
We have made a change to our working copy of the Puppet repo on demo2, but so far we haven’t committed and pushed the change to the master repo. We need to do this so that the changes will be available to all other machines using the repo.
1. Commit the changes:
igurkul@demo2:~$ sudo su – git
$ bash
igurkul@demo2:~$ cd puppet
igurkul@demo2:~/puppet$ git status
# On branch master
# Changes not staged for commit:
# (use “git add …” to update what will be committed)
# (use “git checkout — …” to discard changes in working directory)
#
# modified: manifests/nodes.pp
#
no changes added to commit (use “git add” and/or “git commit -a”)
igurkul@demo2:~/puppet$ git add manifests/nodes.pp
igurkul@demo2:~/puppet$ git commit -m “Adding node demo2″ –author=”john@bitfieldconsulting.com”
[master 967cb8b] Adding node demo2
…
1 file changed, 5 insertions(+)
2. Now push all changes back to the master repo:
igurkul@demo2:~/puppet$ git push
Counting objects: 7, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 412 bytes, done.
Total 4 (delta 0), reused 0 (delta 0)
To 23.20.119.201:/var/git/puppet.git
0ce98c0..967cb8b master -> master