<commit_before>---
layout: post
category : lessons
tags : [tutorial, appengine, deploy]
---
{% include JB/setup %}

If you want to automate p4 to git synchronization, you can use a script which performs all the hard work for you. The idea behind it is simple:

# In git repostory create a branch called p4 (for holding exact state of sources in perforce)
# Do all your work in a separate topic branch
# When you are ready to sync, update the perforce with latest changes and launch the script.
# The script will copy all content from perforce to git location (on p4 branch) and will commit them.

<commit_msg>improve formatting<commit_after>---
layout: post
category : lessons
tags : [tutorial, appengine, deploy]
---
{% include JB/setup %}

### Sync Perforce with Git

If you want to automate p4 to git synchronization, you can use a script which performs all the hard work for you. The idea behind it is simple:

- In git repostory create a branch called p4 (for holding exact state of sources in perforce)
- Do all your work in a separate topic branch
- When you are ready to sync, update the perforce with latest changes and launch the script.
- The script will copy all content from perforce to git location (on p4 branch) and will commit them.

### Script samples

{'fraction_non_alphanumeric': 0.05984251968503937, 'fraction_numerical': 0.004724409448818898, 'mean_word_length': 3.984313725490196, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7144147', 'n_tokens_mistral': 342, 'n_tokens_neox': 330, 'n_words': 203}