How to Convert Shapefile to OSM with attribute information

Hi all,
I am trying to convert shapefile data into OSM format, is there any tools or method in converting it?

thank you for your help:)

The most common tool is OGR2OSM https://github.com/pnorman/ogr2osm - there are options to write a custom filter to produce coherent .OSM files.